aboutsummaryrefslogtreecommitdiffstats
path: root/src/StateFile.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-17 00:56:57 +0100
committerMax Kellermann <max@duempel.org>2013-01-18 15:34:01 +0100
commite5039c478aa93e3e107ee9031a3cf27a6c203fea (patch)
tree5d9fecc644b915fe02634911d65c29123e03c1b8 /src/StateFile.cxx
parent890151450663abd581cab56e853e8e713d822851 (diff)
downloadmpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.tar.gz
mpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.tar.xz
mpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.zip
Path: new class "Path" wraps filesystem path strings
Diffstat (limited to 'src/StateFile.cxx')
-rw-r--r--src/StateFile.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/StateFile.cxx b/src/StateFile.cxx
index b78056520..6f93137a7 100644
--- a/src/StateFile.cxx
+++ b/src/StateFile.cxx
@@ -34,8 +34,8 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "state_file"
-StateFile::StateFile(const char *_path, Partition &_partition, EventLoop &_loop)
- :TimeoutMonitor(_loop), path(_path), partition(_partition),
+StateFile::StateFile(Path &&_path, Partition &_partition, EventLoop &_loop)
+ :TimeoutMonitor(_loop), path(std::move(_path)), partition(_partition),
prev_volume_version(0), prev_output_version(0),
prev_playlist_version(0)
{
@@ -73,7 +73,7 @@ StateFile::Read()
g_debug("Loading state file %s", path.c_str());
- TextFile file(path.c_str());
+ TextFile file(path);
if (file.HasFailed()) {
g_warning("failed to open %s: %s",
path.c_str(), g_strerror(errno));