Nuked the now-empty string.cpp/.h

Fri, 21 Jun 2013 17:36:50 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 21 Jun 2013 17:36:50 +0300
changeset 298
f945fc8dae9e
parent 297
2cbd8ac8293b
child 299
db60288fc36a

Nuked the now-empty string.cpp/.h

src/common.h file | annotate | diff | comparison | revisions
src/config.cpp file | annotate | diff | comparison | revisions
src/config.h file | annotate | diff | comparison | revisions
src/file.cpp file | annotate | diff | comparison | revisions
src/string.cpp file | annotate | diff | comparison | revisions
src/string.h file | annotate | diff | comparison | revisions
--- a/src/common.h	Fri Jun 21 17:29:29 2013 +0300
+++ b/src/common.h	Fri Jun 21 17:36:50 2013 +0300
@@ -32,7 +32,6 @@
 #include <QString>
 #include <QMutex>
 
-#include "string.h"
 #include "config.h"
 #include "types.h"
 
--- a/src/config.cpp	Fri Jun 21 17:29:29 2013 +0300
+++ b/src/config.cpp	Fri Jun 21 17:36:50 2013 +0300
@@ -177,11 +177,7 @@
 			break;
 		}
 		
-		const char* defstr = (cfg->getType() != CONFIG_keyseq) ? cfg->defaultstring :
-			qchars (static_cast<keyseqconfig*> (cfg)->defval.toString ());
-		
 		// Write the entry now.
-		fprint (f, "\n# [%1] default: %2\n", g_ConfigTypeNames[cfg->getType()], defstr);
 		fprint (f, "%1=%2\n", cfg->name, valstring);
 	}
 	
--- a/src/config.h	Fri Jun 21 17:29:29 2013 +0300
+++ b/src/config.h	Fri Jun 21 17:36:50 2013 +0300
@@ -23,13 +23,16 @@
 
 // =============================================================================
 #include <QString>
-#include <qkeysequence.h>
+#include <QKeySequence>
+
+typedef QChar qchar;
+typedef QString str;
 
 #define MAX_INI_LINE 512
 #define MAX_CONFIG 512
 
 #define cfg(T, NAME, DEFAULT) \
-	T##config NAME (DEFAULT, #NAME, #T, #DEFAULT)
+	T##config NAME (DEFAULT, #NAME)
 
 #define extern_cfg(T, NAME) \
 	extern T##config NAME
@@ -47,7 +50,7 @@
 // =========================================================
 class config {
 public:
-	const char* name, *typestring, *defaultstring;
+	const char* name;
 	
 	virtual configtype_e getType () {
 		return CONFIG_none;
@@ -111,13 +114,10 @@
 #define IMPLEMENT_CONFIG(T) \
 	T value, defval; \
 	\
-	T##config (T _defval, const char* _name, const char* _typestring, \
-		const char* _defaultstring) \
+	T##config (T _defval, const char* _name) \
 	{ \
 		value = defval = _defval; \
 		name = _name; \
-		typestring = _typestring; \
-		defaultstring = _defaultstring; \
 		addConfig (this); \
 	} \
 	operator T () { \
--- a/src/file.cpp	Fri Jun 21 17:29:29 2013 +0300
+++ b/src/file.cpp	Fri Jun 21 17:36:50 2013 +0300
@@ -32,7 +32,6 @@
 #include "history.h"
 #include "dialogs.h"
 #include "gldraw.h"
-#include "string.h"
 
 cfg (str, io_ldpath, "");
 cfg (str, io_recentfiles, "");
--- a/src/string.h	Fri Jun 21 17:29:29 2013 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
- *  LDForge: LDraw parts authoring CAD
- *  Copyright (C) 2013 Santeri Piippo
- *  
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *  
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef STR_H
-#define STR_H
-
-#include <string>
-#include <stdarg.h>
-#include <QString>
-#include "types.h"
-
-
-#endif // STR_H
\ No newline at end of file

mercurial