From 800d5d893964a82265577d3352d683035b589f78 Mon Sep 17 00:00:00 2001 From: Naios Date: Sun, 26 Apr 2015 23:45:52 +0200 Subject: Core/Misc: Replace tc's optional with boost::optional. * benefits from empty optimization (objects are only constructed if needed). * supports r-value references (move semantics) (boost >= 1.56.0). * preparation for c++14/17's std::optional and std::none_t. * add move constructor to CompactArray. --- src/server/shared/Utilities/Util.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/server/shared/Utilities') diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 9a8514ea5ca..0886b625370 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -30,27 +30,6 @@ #include #include -template -struct Optional -{ - Optional() : Value(), HasValue(false) { } - - T Value; - bool HasValue; - - inline void Set(T const& v) - { - HasValue = true; - Value = v; - } - - inline void Clear() - { - HasValue = false; - Value = T(); - } -}; - // Searcher for map of structs template struct Finder { -- cgit v1.2.3