From 75cd69d3fca8b0a59d2335384f95091ad89b998c Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 8 Dec 2010 16:58:05 +0200 Subject: [PATCH] =?utf8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D0=B0?= =?utf8?q?=D1=8F=20=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20=D0=BA=D0=BE?= =?utf8?q?=D0=B4=D0=B0=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5?= =?utf8?q?=D0=BA=D0=B8=20conffiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- stglibs/conffiles.lib/conffiles.cpp | 20 +++++--------------- stglibs/conffiles.lib/conffiles.h | 7 +------ 2 files changed, 6 insertions(+), 21 deletions(-) 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; -- 2.44.2