summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/IniFile.cpp
diff options
context:
space:
mode:
authoromegadox <omegadox@gmail.com>2009-03-28 08:57:34 +0000
committeromegadox <omegadox@gmail.com>2009-03-28 08:57:34 +0000
commiteb0cab140f4aa4e17cb60e39e7467a36d6bfa97d (patch)
treef725c5354346506a0491211b87e1d59cb62b7fdc /Source/Core/Common/Src/IniFile.cpp
parentbdabcd4bf5a460eaed21571b17ecd48b8f8c01aa (diff)
Some code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2768 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/IniFile.cpp')
-rw-r--r--Source/Core/Common/Src/IniFile.cpp32
1 files changed, 2 insertions, 30 deletions
diff --git a/Source/Core/Common/Src/IniFile.cpp b/Source/Core/Common/Src/IniFile.cpp
index 772a822919..d2c8b2f94e 100644
--- a/Source/Core/Common/Src/IniFile.cpp
+++ b/Source/Core/Common/Src/IniFile.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// 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
@@ -16,9 +16,6 @@
// http://code.google.com/p/dolphin-emu/
// see IniFile.h
-//////////////////////////////////////////////////////////////////////////////////////
-// Include
-// ------------
#include <stdlib.h>
#include <stdio.h>
@@ -30,24 +27,13 @@
#include "StringUtil.h"
#include "IniFile.h"
-///////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Class
-// ------------
IniFile::IniFile()
{}
-
IniFile::~IniFile()
{}
-///////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Section functions used locally only
-// ------------
Section::Section()
: lines(), name(""), comment("") {}
@@ -91,7 +77,6 @@ Section* IniFile::GetOrCreateSection(const char* sectionName)
return(section);
}
-///////////////////////////////
bool IniFile::DeleteSection(const char* sectionName)
@@ -115,7 +100,6 @@ bool IniFile::DeleteSection(const char* sectionName)
return false;
}
-
void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut, std::string* commentOut) const
{
// allow many types of commenting
@@ -153,7 +137,6 @@ void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::strin
}
}
-
std::string* IniFile::GetLine(Section* section, const char* key, std::string* valueOut, std::string* commentOut)
{
for (std::vector<std::string>::iterator iter = section->lines.begin(); iter != section->lines.end(); ++iter)
@@ -283,10 +266,6 @@ void IniFile::SortSections()
std::sort(sections.begin(), sections.end());
}
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Load and save file
-// ------------
bool IniFile::Load(const char* filename)
{
// Maximum number of letters in a line
@@ -382,12 +361,7 @@ bool IniFile::Save(const char* filename)
out.close();
return true;
}
-//////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Get and set elements
-// ------------
void IniFile::Set(const char* sectionName, const char* key, const char* newValue)
{
Section* section = GetOrCreateSection(sectionName);
@@ -544,10 +518,9 @@ bool IniFile::Get(const char* sectionName, const char* key, bool* value, bool de
*value = defaultValue;
return false;
}
-////////////////////////////////////////
-
+// TODO: Keep this code below?
/*
int main()
{
@@ -567,4 +540,3 @@ bool IniFile::Get(const char* sectionName, const char* key, bool* value, bool de
return 0;
}
*/
-