From: Maxim Mamontov Date: Wed, 8 Dec 2010 14:58:05 +0000 (+0200) Subject: Небольшая чистка кода библиотеки conffiles X-Git-Tag: 2.407-rc3~306 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/75cd69d3fca8b0a59d2335384f95091ad89b998c Небольшая чистка кода библиотеки conffiles --- diff --git a/stglibs/conffiles.lib/conffiles.cpp b/stglibs/conffiles.lib/conffiles.cpp index 549cb22d..a6fbe6d6 100644 --- a/stglibs/conffiles.lib/conffiles.cpp +++ b/stglibs/conffiles.lib/conffiles.cpp @@ -28,11 +28,13 @@ */ //--------------------------------------------------------------------------- -#include -#include -#include +#include +#include +#include + #include #include + #include "conffiles.h" #include "common.h" @@ -133,16 +135,6 @@ error = 0; return e; } //--------------------------------------------------------------------------- -int CONFIGFILE::FindParameter(const string ¶meter, string * value) const -{ -it = param_val.find(parameter); -if (it == param_val.end()) - return -1; - -*value = param_val[parameter]; -return 0; -} -//--------------------------------------------------------------------------- int CONFIGFILE::Flush() { fstream f(fileName.c_str(), ios::out); @@ -451,5 +443,3 @@ Flush(); return 0; } //--------------------------------------------------------------------------- - - diff --git a/stglibs/conffiles.lib/conffiles.h b/stglibs/conffiles.lib/conffiles.h index ee575d65..83a16d9b 100644 --- a/stglibs/conffiles.lib/conffiles.h +++ b/stglibs/conffiles.lib/conffiles.h @@ -31,8 +31,7 @@ #ifndef ConfFilesH #define ConfFilesH -#include -#include + #include #include @@ -40,8 +39,6 @@ using namespace std; //--------------------------------------------------------------------------- -//#define CONF_STR_LEN 300 -//typedef char STRING[CONF_STR_LEN]; typedef bool (*StringCaseCmp_t)(const string & str1, const string & str2); @@ -67,8 +64,6 @@ public: int ReadString(const string & param, char * val, int * maxLen, const char * defaultVal) const; int ReadString(const string & param, string * val, const string & defaultVal) const; - int FindParameter(const string ¶meter, string * value) const; - int ReadTime (const string & param, time_t *, time_t) const; int ReadShortInt (const string & param, short int *, short int) const;