Removed some redundant 'const', and with it re-enabled '-Wignored-qualifiers'.

This commit is contained in:
Stephen Anthony 2019-05-03 12:39:03 -02:30
parent eb3e1b00dd
commit 1ad61ea117
6 changed files with 14 additions and 14 deletions

View File

@ -50,7 +50,7 @@ else
CXXFLAGS:= -O2 -x c++
endif
CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers
CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter
ifdef HAVE_GCC
CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=c++14

View File

@ -439,7 +439,7 @@ namespace StellaModTest
namespace StellaKeyName
{
inline const char* const forKey(StellaKey key)
inline const char* forKey(StellaKey key)
{
#ifdef SDL_SUPPORT
return SDL_GetScancodeName(SDL_Scancode(key));

View File

@ -56,23 +56,23 @@ class Variant
// Conversion methods
const string& toString() const { return data; }
const char* const toCString() const { return data.c_str(); }
const Int32 toInt() const {
const char* toCString() const { return data.c_str(); }
Int32 toInt() const {
istringstream ss(data);
Int32 parsed;
ss >> parsed;
return parsed;
}
const float toFloat() const {
float toFloat() const {
istringstream ss(data);
float parsed;
ss >> parsed;
return parsed;
}
const bool toBool() const { return data == "1" || data == "true"; }
const Common::Size toSize() const { return Common::Size(data); }
bool toBool() const { return data == "1" || data == "true"; }
Common::Size toSize() const { return Common::Size(data); }
// Comparison
bool operator==(const Variant& v) const { return data == v.data; }

View File

@ -341,7 +341,7 @@ bool ZipHandler::ZipFile::readStream(ByteBuffer& out, uInt64 offset,
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const ZipHandler::ZipHeader* const ZipHandler::ZipFile::nextFile()
const ZipHandler::ZipHeader* ZipHandler::ZipFile::nextFile()
{
// Make sure we have enough data
// If we're at or past the end, we're done

View File

@ -137,7 +137,7 @@ class ZipHandler
bool readStream(ByteBuffer& out, uInt64 offset, uInt64 length, uInt64& actual);
/** Return the next entry in the ZIP file */
const ZipHeader* const nextFile();
const ZipHeader* nextFile();
/** Decompress the most recently found file in the ZIP into target buffer */
void decompress(ByteBuffer& out, uInt64 length);

View File

@ -37,7 +37,7 @@ class GameList
{ return i < myArray.size() ? myArray[i]._path : EmptyString; }
const string& md5(uInt32 i) const
{ return i < myArray.size() ? myArray[i]._md5 : EmptyString; }
const bool isDir(uInt32 i) const
bool isDir(uInt32 i) const
{ return i < myArray.size() ? myArray[i]._isdir: false; }
void setMd5(uInt32 i, const string& md5)