aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Utilities/Util.h
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2015-04-26 23:45:52 +0200
committerNaios <naios-dev@live.de>2015-04-26 23:45:52 +0200
commit800d5d893964a82265577d3352d683035b589f78 (patch)
tree7b68f59be62a5df207c158a3f70fbf5860b91f69 /src/server/shared/Utilities/Util.h
parentf4a4e5de3d7d89116bc6eda20c0d37361fdd2023 (diff)
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.
Diffstat (limited to 'src/server/shared/Utilities/Util.h')
-rw-r--r--src/server/shared/Utilities/Util.h21
1 files changed, 0 insertions, 21 deletions
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 <stdarg.h>
#include <cstring>
-template<typename T>
-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<typename T, class S> struct Finder
{