diff options
author | Max Kellermann <max@duempel.org> | 2014-02-17 23:04:06 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-17 23:04:10 +0100 |
commit | 1709ab6810486648ac23bcf683d4e2326ede9d5a (patch) | |
tree | 468d7c44ce60dde98683c32297fe036fa765b166 /src/fs/TextFile.hxx | |
parent | ce925ba56fdcdf6168db7597185f6c34643a7501 (diff) | |
download | mpd-1709ab6810486648ac23bcf683d4e2326ede9d5a.tar.gz mpd-1709ab6810486648ac23bcf683d4e2326ede9d5a.tar.xz mpd-1709ab6810486648ac23bcf683d4e2326ede9d5a.zip |
fs/TextFile: use custom allocation instead of GString
Diffstat (limited to 'src/fs/TextFile.hxx')
-rw-r--r-- | src/fs/TextFile.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fs/TextFile.hxx b/src/fs/TextFile.hxx index b4b850c0f..e3a712a88 100644 --- a/src/fs/TextFile.hxx +++ b/src/fs/TextFile.hxx @@ -23,9 +23,9 @@ #include "Compiler.h" #include <stdio.h> +#include <stddef.h> class Path; -typedef struct _GString GString; class TextFile { static constexpr size_t max_length = 512 * 1024; @@ -33,7 +33,8 @@ class TextFile { FILE *const file; - GString *const buffer; + char *buffer; + size_t capacity, length; public: TextFile(Path path_fs); |