X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fserialize.h;h=df0cbd5d58fa43379bb19dd2da982280c02377a2;hb=b4a174ee9c32d62ea6bf010e837e8c5b1c3d36a3;hp=b3783a48fe16604da33d934d355dd61e22b2dfef;hpb=d0f802e30c492cb1b7e55f51063bfd38b29931c6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/serialize.h b/include/serialize.h index b3783a48f..df0cbd5d5 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2019 Peter Powell + * Copyright (C) 2019-2020 Sadie Powell * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -31,10 +31,10 @@ class CoreExport Serializable { public: /** Maps keys to serialised data. */ - typedef TR1NS::unordered_map ChildMap; + typedef insp::flat_map ChildMap; /** Maps keys to simple values. */ - typedef TR1NS::unordered_map EntryMap; + typedef insp::flat_map EntryMap; private: /** A mapping of keys to serialised data. */ @@ -44,7 +44,7 @@ class CoreExport Serializable EntryMap entries; public: - /** Retrieves the child elements. */ + /** Retrieves the child elements. */ const ChildMap& GetChildren() const { return children; } ChildMap& GetChildren() { return children; } @@ -82,19 +82,19 @@ class CoreExport Serializable /** Stores the serialised data against the specified key. * @param key The key by which this serialised data should be stored against. - * @param out The serialised data to store. + * @param value The serialised data to store. */ Data& Store(const std::string& key, const Data& value); /** Stores the value against the specified key. * @param key The key by which this value should be stored against. - * @param out The value to store. + * @param value The value to store. */ Data& Store(const std::string& key, const std::string& value); /** Stores the value against the specified key. The value will be converted to a string using ConvToStr. * @param key The key by which this value should be stored against. - * @param out The value to store. + * @param value The value to store. */ template Data& Store(const std::string& key, const T& value)