Skip to content

Commit

Permalink
[SADXModLoader] IniFile: Remove std::unordered_map<>::reverse_iterato…
Browse files Browse the repository at this point in the history
…r functions.

unordered_map doesn't have a reverse_iterator class, and never did.

It might have existed in MSVC 2010's C++ runtime due to an implementation
artifact, but it isn't supposed to be there, and it causes problems with
newer versions of MSVC.
  • Loading branch information
GerbilSoft committed Aug 31, 2015
1 parent 2fecb65 commit 511fb59
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
40 changes: 0 additions & 40 deletions SADXModLoader/IniFile.cpp
Expand Up @@ -147,16 +147,6 @@ std::unordered_map<string, string>::const_iterator IniGroup::cbegin() const
return m_data.cbegin();
}

std::unordered_map<string, string>::reverse_iterator IniGroup::rbegin()
{
return m_data.rbegin();
}

std::unordered_map<string, string>::const_reverse_iterator IniGroup::crbegin() const
{
return m_data.crbegin();
}

std::unordered_map<string, string>::iterator IniGroup::end()
{
return m_data.end();
Expand All @@ -167,16 +157,6 @@ std::unordered_map<string, string>::const_iterator IniGroup::cend() const
return m_data.cend();
}

std::unordered_map<string, string>::reverse_iterator IniGroup::rend()
{
return m_data.rend();
}

std::unordered_map<string, string>::const_reverse_iterator IniGroup::crend() const
{
return m_data.crend();
}

/** IniFile **/

IniFile::IniFile(const string &filename)
Expand Down Expand Up @@ -362,16 +342,6 @@ std::unordered_map<string, IniGroup*>::const_iterator IniFile::cbegin() const
return m_groups.cbegin();
}

std::unordered_map<string, IniGroup*>::reverse_iterator IniFile::rbegin()
{
return m_groups.rbegin();
}

std::unordered_map<string, IniGroup*>::const_reverse_iterator IniFile::crbegin() const
{
return m_groups.crbegin();
}

std::unordered_map<string, IniGroup*>::iterator IniFile::end()
{
return m_groups.end();
Expand All @@ -382,16 +352,6 @@ std::unordered_map<string, IniGroup*>::const_iterator IniFile::cend() const
return m_groups.cend();
}

std::unordered_map<string, IniGroup*>::reverse_iterator IniFile::rend()
{
return m_groups.rend();
}

std::unordered_map<string, IniGroup*>::const_reverse_iterator IniFile::crend() const
{
return m_groups.crend();
}

/**
* Load an INI file.
* Internal function; called from the constructor.
Expand Down
8 changes: 0 additions & 8 deletions SADXModLoader/IniFile.hpp
Expand Up @@ -32,12 +32,8 @@ class IniGroup

std::unordered_map<std::string, std::string>::iterator begin();
std::unordered_map<std::string, std::string>::const_iterator cbegin() const;
std::unordered_map<std::string, std::string>::reverse_iterator rbegin();
std::unordered_map<std::string, std::string>::const_reverse_iterator crbegin() const;
std::unordered_map<std::string, std::string>::iterator end();
std::unordered_map<std::string, std::string>::const_iterator cend() const;
std::unordered_map<std::string, std::string>::reverse_iterator rend();
std::unordered_map<std::string, std::string>::const_reverse_iterator crend() const;

protected:
friend class IniFile;
Expand Down Expand Up @@ -77,12 +73,8 @@ class IniFile

std::unordered_map<std::string, IniGroup*>::iterator begin();
std::unordered_map<std::string, IniGroup*>::const_iterator cbegin() const;
std::unordered_map<std::string, IniGroup*>::reverse_iterator rbegin();
std::unordered_map<std::string, IniGroup*>::const_reverse_iterator crbegin() const;
std::unordered_map<std::string, IniGroup*>::iterator end();
std::unordered_map<std::string, IniGroup*>::const_iterator cend() const;
std::unordered_map<std::string, IniGroup*>::reverse_iterator rend();
std::unordered_map<std::string, IniGroup*>::const_reverse_iterator crend() const;

protected:
void load(FILE *f);
Expand Down

0 comments on commit 511fb59

Please sign in to comment.