Quellcode durchsuchen

Move global link-list out of setting classes

Daniele Bartolini vor 12 Jahren
Ursprung
Commit
c04b24807a

+ 5 - 5
src/core/settings/FloatSetting.cpp

@@ -28,7 +28,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 namespace crown
 {
 {
 
 
-FloatSetting* FloatSetting::g_float_settings_head = NULL;
+static FloatSetting* g_float_settings_head = NULL;
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 FloatSetting::FloatSetting(const char* name, const char* synopsis, float value, float min, float max) :
 FloatSetting::FloatSetting(const char* name, const char* synopsis, float value, float min, float max) :
@@ -41,15 +41,15 @@ FloatSetting::FloatSetting(const char* name, const char* synopsis, float value,
 {
 {
 	*this = value;
 	*this = value;
 
 
-	if (FloatSetting::g_float_settings_head == NULL)
+	if (g_float_settings_head == NULL)
 	{
 	{
-		FloatSetting::g_float_settings_head = this;
+		g_float_settings_head = this;
 		m_next = NULL;
 		m_next = NULL;
 	}
 	}
 	else
 	else
 	{
 	{
-		m_next = FloatSetting::g_float_settings_head;
-		FloatSetting::g_float_settings_head = this;
+		m_next = g_float_settings_head;
+		g_float_settings_head = this;
 	}
 	}
 }
 }
 
 

+ 0 - 4
src/core/settings/FloatSetting.h

@@ -47,10 +47,6 @@ public:
 
 
 	FloatSetting&		operator=(const float value);
 	FloatSetting&		operator=(const float value);
 
 
-private:
-
-	static FloatSetting*	g_float_settings_head;
-
 private:
 private:
 
 
 	const char*			m_name;
 	const char*			m_name;

+ 5 - 5
src/core/settings/IntSetting.cpp

@@ -28,7 +28,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 namespace crown
 {
 {
 
 
-IntSetting* IntSetting::g_int_settings_head = NULL;
+static IntSetting* g_int_settings_head = NULL;
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 IntSetting::IntSetting(const char* name, const char* synopsis, int32_t value, int32_t min, int32_t max) :
 IntSetting::IntSetting(const char* name, const char* synopsis, int32_t value, int32_t min, int32_t max) :
@@ -41,15 +41,15 @@ IntSetting::IntSetting(const char* name, const char* synopsis, int32_t value, in
 {
 {
 	*this = value;
 	*this = value;
 
 
-	if (IntSetting::g_int_settings_head == NULL)
+	if (g_int_settings_head == NULL)
 	{
 	{
-		IntSetting::g_int_settings_head = this;
+		g_int_settings_head = this;
 		m_next = NULL;
 		m_next = NULL;
 	}
 	}
 	else
 	else
 	{
 	{
-		m_next = IntSetting::g_int_settings_head;
-		IntSetting::g_int_settings_head = this;
+		m_next = g_int_settings_head;
+		g_int_settings_head = this;
 	}
 	}
 }
 }
 
 

+ 0 - 4
src/core/settings/IntSetting.h

@@ -47,10 +47,6 @@ public:
 
 
 	IntSetting&			operator=(const int32_t value);
 	IntSetting&			operator=(const int32_t value);
 
 
-private:
-
-	static IntSetting*	g_int_settings_head;
-
 private:
 private:
 
 
 	const char*			m_name;
 	const char*			m_name;