From 9e9198e0907d3d6fd353c683478007f418d86dd8 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 25 Oct 2013 11:15:44 +0200 Subject: cIniFile doesn't store filename internally anymore. --- source/BlockID.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/BlockID.cpp') diff --git a/source/BlockID.cpp b/source/BlockID.cpp index 95e1a63bf..2e957593b 100644 --- a/source/BlockID.cpp +++ b/source/BlockID.cpp @@ -42,8 +42,8 @@ class cBlockIDMap public: cBlockIDMap(void) { - cIniFile Ini("items.ini"); - if (!Ini.ReadFile()) + cIniFile Ini; + if (!Ini.ReadFile("items.ini")) { return; } -- cgit v1.2.3 From 323ebf119f35dc2bb689715a05f182238d7088f8 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 25 Oct 2013 11:38:14 +0200 Subject: cIniFile: Renamed functions to make meaning more explicit. For example KeyComment() -> GetKeyComment() / AddKeyComment() --- source/BlockID.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/BlockID.cpp') diff --git a/source/BlockID.cpp b/source/BlockID.cpp index 2e957593b..7193094d8 100644 --- a/source/BlockID.cpp +++ b/source/BlockID.cpp @@ -47,15 +47,15 @@ public: { return; } - long KeyID = Ini.FindKey("Items"); + int KeyID = Ini.FindKey("Items"); if (KeyID == cIniFile::noID) { return; } - unsigned NumValues = Ini.GetNumValues(KeyID); - for (unsigned i = 0; i < NumValues; i++) + int NumValues = Ini.GetNumValues(KeyID); + for (int i = 0; i < NumValues; i++) { - AString Name = Ini.ValueName(KeyID, i); + AString Name = Ini.GetValueName(KeyID, i); if (Name.empty()) { continue; -- cgit v1.2.3