From e5039c478aa93e3e107ee9031a3cf27a6c203fea Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Jan 2013 00:56:57 +0100 Subject: Path: new class "Path" wraps filesystem path strings --- src/TextFile.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/TextFile.hxx') diff --git a/src/TextFile.hxx b/src/TextFile.hxx index 25f6ea7a..b24889f6 100644 --- a/src/TextFile.hxx +++ b/src/TextFile.hxx @@ -21,6 +21,7 @@ #define MPD_TEXT_FILE_HXX #include "gcc.h" +#include "Path.hxx" #include @@ -35,8 +36,9 @@ class TextFile { GString *const buffer; public: - TextFile(const char *path_fs) - :file(fopen(path_fs, "r")), buffer(g_string_sized_new(step)) {} + TextFile(const Path &path_fs) + :file(fopen(path_fs.c_str(), "r")), + buffer(g_string_sized_new(step)) {} TextFile(const TextFile &other) = delete; -- cgit v1.2.3