# HG changeset patch # User Santeri Piippo # Date 1371825410 -10800 # Node ID f945fc8dae9e09eb0dd4be0f834f7247ee338f62 # Parent 2cbd8ac8293b6fe6f2d0a8849666f5940f9ce7e6 Nuked the now-empty string.cpp/.h diff -r 2cbd8ac8293b -r f945fc8dae9e src/common.h --- 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 #include -#include "string.h" #include "config.h" #include "types.h" diff -r 2cbd8ac8293b -r f945fc8dae9e src/config.cpp --- 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 (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); } diff -r 2cbd8ac8293b -r f945fc8dae9e src/config.h --- 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 -#include +#include + +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 () { \ diff -r 2cbd8ac8293b -r f945fc8dae9e src/file.cpp --- 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, ""); diff -r 2cbd8ac8293b -r f945fc8dae9e src/string.cpp diff -r 2cbd8ac8293b -r f945fc8dae9e src/string.h --- 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 . - */ - -#ifndef STR_H -#define STR_H - -#include -#include -#include -#include "types.h" - - -#endif // STR_H \ No newline at end of file