summaryrefslogtreecommitdiffstats
path: root/src/MemorySettingsRepository.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-02 13:12:34 +0200
committerMattes D <github@xoft.cz>2016-08-04 20:47:53 +0200
commitd1dee3c9092b7c270b297366757c9fc8d03bb0dd (patch)
treeccbb0e62481ce4944107294200c948f835494fe0 /src/MemorySettingsRepository.h
parentMerge pull request #3293 from LogicParrot/blockArea (diff)
downloadcuberite-d1dee3c9092b7c270b297366757c9fc8d03bb0dd.tar
cuberite-d1dee3c9092b7c270b297366757c9fc8d03bb0dd.tar.gz
cuberite-d1dee3c9092b7c270b297366757c9fc8d03bb0dd.tar.bz2
cuberite-d1dee3c9092b7c270b297366757c9fc8d03bb0dd.tar.lz
cuberite-d1dee3c9092b7c270b297366757c9fc8d03bb0dd.tar.xz
cuberite-d1dee3c9092b7c270b297366757c9fc8d03bb0dd.tar.zst
cuberite-d1dee3c9092b7c270b297366757c9fc8d03bb0dd.zip
Diffstat (limited to 'src/MemorySettingsRepository.h')
-rw-r--r--src/MemorySettingsRepository.h45
1 files changed, 35 insertions, 10 deletions
diff --git a/src/MemorySettingsRepository.h b/src/MemorySettingsRepository.h
index aee4bafd4..d452ec269 100644
--- a/src/MemorySettingsRepository.h
+++ b/src/MemorySettingsRepository.h
@@ -53,20 +53,45 @@ private:
struct sValue
{
- sValue(AString value) : m_Type(eType::String), m_stringValue (value) {}
- sValue(Int64 value) : m_Type(eType::Int64), m_intValue(value) {}
- sValue(bool value) : m_Type(eType::Bool), m_boolValue(value) {}
+ sValue(AString value):
+ #ifdef _DEBUG
+ m_Type(eType::String),
+ #endif
+ m_stringValue (value)
+ {
+ }
+
+ sValue(Int64 value):
+ #ifdef _DEBUG
+ m_Type(eType::Int64),
+ #endif
+ m_intValue(value)
+ {
+ }
+
+ sValue(bool value):
+ #ifdef _DEBUG
+ m_Type(eType::Bool),
+ #endif
+ m_boolValue(value)
+ {
+ }
AString getStringValue() const { ASSERT(m_Type == eType::String); return m_stringValue; }
Int64 getIntValue() const { ASSERT(m_Type == eType::Int64); return m_intValue; }
bool getBoolValue() const { ASSERT(m_Type == eType::Bool); return m_boolValue; }
- private:
- enum class eType
- {
- String,
- Int64,
- Bool
- } m_Type;
+
+ private:
+
+ #ifdef _DEBUG
+ enum class eType
+ {
+ String,
+ Int64,
+ Bool
+ } m_Type;
+ #endif
+
AString m_stringValue;
union
{