From 47e37635f50c09b4f9a9ee7699e3120bab3e4088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 10 Apr 2016 04:29:29 +0200 Subject: NOISSUE split GUI stuff from logic library --- logic/DefaultVariable.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 logic/DefaultVariable.h (limited to 'logic/DefaultVariable.h') diff --git a/logic/DefaultVariable.h b/logic/DefaultVariable.h deleted file mode 100644 index 38d7ecc2..00000000 --- a/logic/DefaultVariable.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -template -class DefaultVariable -{ -public: - DefaultVariable(const T & value) - { - defaultValue = value; - } - DefaultVariable & operator =(const T & value) - { - currentValue = value; - is_default = currentValue == defaultValue; - is_explicit = true; - return *this; - } - operator const T &() const - { - return is_default ? defaultValue : currentValue; - } - bool isDefault() const - { - return is_default; - } - bool isExplicit() const - { - return is_explicit; - } -private: - T currentValue; - T defaultValue; - bool is_default = true; - bool is_explicit = false; -}; -- cgit v1.2.3