Merge default and non-default ctor.
Simplify a little.
This commit is contained in:
@@ -18,11 +18,6 @@
|
|||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//default constructor
|
|
||||||
IniFile::IniFile()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//constructor, can specify pathname here instead of using SetPath later
|
//constructor, can specify pathname here instead of using SetPath later
|
||||||
IniFile::IniFile(CString inipath)
|
IniFile::IniFile(CString inipath)
|
||||||
{
|
{
|
||||||
@@ -64,8 +59,9 @@ bool IniFile::ReadFile()
|
|||||||
CString line;
|
CString line;
|
||||||
while (file.ReadString(line))
|
while (file.ReadString(line))
|
||||||
{
|
{
|
||||||
if (line != "")
|
if (line == "")
|
||||||
{
|
continue;
|
||||||
|
|
||||||
if (line[0] == '[' && line[line.GetLength()-1] == ']') //if a section heading
|
if (line[0] == '[' && line[line.GetLength()-1] == ']') //if a section heading
|
||||||
{
|
{
|
||||||
keyname = line;
|
keyname = line;
|
||||||
@@ -83,7 +79,6 @@ bool IniFile::ReadFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
file.Close();
|
file.Close();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,11 +57,8 @@ public:
|
|||||||
|
|
||||||
//public functions
|
//public functions
|
||||||
public:
|
public:
|
||||||
//default constructor
|
|
||||||
IniFile();
|
|
||||||
|
|
||||||
//constructor, can specify pathname here instead of using SetPath later
|
//constructor, can specify pathname here instead of using SetPath later
|
||||||
IniFile(CString inipath);
|
IniFile(CString inipath = "");
|
||||||
|
|
||||||
//default destructor
|
//default destructor
|
||||||
virtual ~IniFile();
|
virtual ~IniFile();
|
||||||
|
|||||||
Reference in New Issue
Block a user