From 8f12614f2da8221438a3807b1d234517650fbdb6 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 2 Jan 2025 16:27:56 -0600 Subject: Clang tidy fixes. --- include/fud_csv.hpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'include/fud_csv.hpp') diff --git a/include/fud_csv.hpp b/include/fud_csv.hpp index 38b1b81..237c56f 100644 --- a/include/fud_csv.hpp +++ b/include/fud_csv.hpp @@ -25,8 +25,6 @@ #include "fud_utf8.hpp" #include "fud_vector.hpp" -#include // reference_wrapper - namespace fud { using TextBuffer = Vector; @@ -70,19 +68,26 @@ struct Csv { static Csv make(Allocator& entryAllocator, Allocator& bufferAllocator); /** Consume and return the CSV. */ - static FudStatus parseFromFilename( + static FudStatus parseFromFilenameUnbuffered( + Csv& csv, + StringView filename, + OpenFlags flags = OpenFlags{}, + Option dirFdOption = NullOpt, + size_t maxExtraAttempts = 0); + + static FudStatus parseFromFilenameBuffered( Csv& csv, - Option bufferOption, + TextBuffer&& buffer, StringView filename, OpenFlags flags = OpenFlags{}, Option dirFdOption = NullOpt, - Option maxExtraAttempts = NullOpt); + size_t maxExtraAttempts = 0); // assumes file is at start - static FudStatus parseFromUnbufferedFile(Csv& csv, RegularFile&& file, Option maxExtraAttempts); + static FudStatus parseFromUnbufferedFile(Csv& csv, RegularFile&& file, size_t maxExtraAttempts); // assumes file is at start - static FudStatus parseFromBufferedFile(Csv& csv, BufferedRegularFile& file, Option maxExtraAttempts); + static FudStatus parseFromBufferedFile(Csv& csv, BufferedRegularFile& file, size_t maxExtraAttempts); }; } // namespace fud -- cgit v1.2.3