aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-03-22 17:09:07 +0000
committerGravatar Sadie Powell2025-03-22 17:13:01 +0000
commitafc6beb804e6414b392591edd65d69cdceb7cf1e (patch)
treebfbe21b2600f3d01d023f4e7ad5e218f16eb7373 /include
parentRemove an obsolete ConvToStr overload. (diff)
Migrate configparser/configreader away from stringstream.
This is a very slow header to have included by every source file.
Diffstat (limited to 'include')
-rw-r--r--include/configparser.h2
-rw-r--r--include/configreader.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/configparser.h b/include/configparser.h
index 9eb9c6b90..587616b86 100644
--- a/include/configparser.h
+++ b/include/configparser.h
@@ -30,7 +30,7 @@ struct ParseStack final
insp::flat_map<std::string, std::string, irc::insensitive_swo> vars;
ServerConfig::TagMap& output;
ServerConfig::FileSource& FilesOutput;
- std::stringstream& errstr;
+ std::vector<std::string>& errors;
ParseStack(ServerConfig* conf);
bool ParseFile(const std::string& name, int flags, const std::string& mandatory_tag = std::string(), bool isexec = false);
diff --git a/include/configreader.h b/include/configreader.h
index 62efaa404..ae6a8ea34 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -245,7 +245,7 @@ class CoreExport ServerConfig final
{
private:
friend class ConfigReaderThread; // valid
- friend struct ParseStack; // config_data, errstr, filesources
+ friend struct ParseStack; // config_data, errors, filesources
/** Holds the contents of a cached file. */
typedef insp::flat_map<std::string, std::pair<std::string, time_t>> FileCache;
@@ -260,7 +260,7 @@ private:
TagMap config_data;
/** Whether any errors occurred whilst reading the server config. */
- std::stringstream errstr;
+ std::vector<std::string> errors;
/** Files which have been read from disk. */
FileCache filecontents;