diff options
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h index f8bcc0192c..23b2a787e4 100644 --- a/src/util.h +++ b/src/util.h @@ -276,12 +276,12 @@ public: /** * Get the help string */ - std::string GetHelpMessage(); + std::string GetHelpMessage() const; /** * Check whether we know of this arg */ - bool IsArgKnown(const std::string& key, std::string& error); + bool IsArgKnown(const std::string& key) const; }; extern ArgsManager gArgs; @@ -355,4 +355,18 @@ std::string CopyrightHolders(const std::string& strPrefix); */ int ScheduleBatchPriority(void); +namespace util { + +//! Simplification of std insertion +template <typename Tdst, typename Tsrc> +inline void insert(Tdst& dst, const Tsrc& src) { + dst.insert(dst.begin(), src.begin(), src.end()); +} +template <typename TsetT, typename Tsrc> +inline void insert(std::set<TsetT>& dst, const Tsrc& src) { + dst.insert(src.begin(), src.end()); +} + +} // namespace util + #endif // BITCOIN_UTIL_H |