mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-11 16:41:26 +00:00
Remove -Wno-ignored-qualifiers and fix caused warnings
This commit is contained in:
parent
c62d53ae84
commit
77a4e38c49
4 changed files with 9 additions and 12 deletions
|
@ -362,9 +362,6 @@ endif()
|
||||||
if (CMAKE_COMPILER_IS_GNUCC)
|
if (CMAKE_COMPILER_IS_GNUCC)
|
||||||
SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-reorder -std=c++98 -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-reorder -std=c++98 -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}")
|
||||||
|
|
||||||
# Silence warnings in OGRE headers. Remove once OGRE got fixed!
|
|
||||||
SET(CMAKE_CXX_FLAGS "-Wno-ignored-qualifiers ${CMAKE_CXX_FLAGS}")
|
|
||||||
|
|
||||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||||
OUTPUT_VARIABLE GCC_VERSION)
|
OUTPUT_VARIABLE GCC_VERSION)
|
||||||
if ("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6)
|
if ("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6)
|
||||||
|
|
|
@ -83,7 +83,7 @@ public:
|
||||||
// indirectly to the load() method.
|
// indirectly to the load() method.
|
||||||
int mIdx;
|
int mIdx;
|
||||||
void setIndex(const int index) {mIdx = index; mCtx.index = index;}
|
void setIndex(const int index) {mIdx = index; mCtx.index = index;}
|
||||||
const int getIndex() {return mIdx;}
|
int getIndex() {return mIdx;}
|
||||||
|
|
||||||
void setGlobalReaderList(std::vector<ESMReader> *list) {mGlobalReaderList = list;}
|
void setGlobalReaderList(std::vector<ESMReader> *list) {mGlobalReaderList = list;}
|
||||||
std::vector<ESMReader> *getGlobalReaderList() {return mGlobalReaderList;}
|
std::vector<ESMReader> *getGlobalReaderList() {return mGlobalReaderList;}
|
||||||
|
|
|
@ -79,7 +79,7 @@ void Manager::saveUser(const std::string& file)
|
||||||
fout.close();
|
fout.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string Manager::getString (const std::string& setting, const std::string& category)
|
std::string Manager::getString (const std::string& setting, const std::string& category)
|
||||||
{
|
{
|
||||||
if (mNewSettings.find(std::make_pair(category, setting)) != mNewSettings.end())
|
if (mNewSettings.find(std::make_pair(category, setting)) != mNewSettings.end())
|
||||||
return mNewSettings[std::make_pair(category, setting)];
|
return mNewSettings[std::make_pair(category, setting)];
|
||||||
|
@ -92,17 +92,17 @@ const std::string Manager::getString (const std::string& setting, const std::str
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float Manager::getFloat (const std::string& setting, const std::string& category)
|
float Manager::getFloat (const std::string& setting, const std::string& category)
|
||||||
{
|
{
|
||||||
return Ogre::StringConverter::parseReal( getString(setting, category) );
|
return Ogre::StringConverter::parseReal( getString(setting, category) );
|
||||||
}
|
}
|
||||||
|
|
||||||
const int Manager::getInt (const std::string& setting, const std::string& category)
|
int Manager::getInt (const std::string& setting, const std::string& category)
|
||||||
{
|
{
|
||||||
return Ogre::StringConverter::parseInt( getString(setting, category) );
|
return Ogre::StringConverter::parseInt( getString(setting, category) );
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool Manager::getBool (const std::string& setting, const std::string& category)
|
bool Manager::getBool (const std::string& setting, const std::string& category)
|
||||||
{
|
{
|
||||||
return Ogre::StringConverter::parseBool( getString(setting, category) );
|
return Ogre::StringConverter::parseBool( getString(setting, category) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,10 @@ namespace Settings
|
||||||
static const CategorySettingVector apply();
|
static const CategorySettingVector apply();
|
||||||
///< returns the list of changed settings and then clears it
|
///< returns the list of changed settings and then clears it
|
||||||
|
|
||||||
static const int getInt (const std::string& setting, const std::string& category);
|
static int getInt (const std::string& setting, const std::string& category);
|
||||||
static const float getFloat (const std::string& setting, const std::string& category);
|
static float getFloat (const std::string& setting, const std::string& category);
|
||||||
static const std::string getString (const std::string& setting, const std::string& category);
|
static std::string getString (const std::string& setting, const std::string& category);
|
||||||
static const bool getBool (const std::string& setting, const std::string& category);
|
static bool getBool (const std::string& setting, const std::string& category);
|
||||||
|
|
||||||
static void setInt (const std::string& setting, const std::string& category, const int value);
|
static void setInt (const std::string& setting, const std::string& category, const int value);
|
||||||
static void setFloat (const std::string& setting, const std::string& category, const float value);
|
static void setFloat (const std::string& setting, const std::string& category, const float value);
|
||||||
|
|
Loading…
Reference in a new issue