mirror of https://github.com/stella-emu/stella.git
Removed some redundant 'const', and with it re-enabled '-Wignored-qualifiers'.
This commit is contained in:
parent
eb3e1b00dd
commit
1ad61ea117
10
Makefile
10
Makefile
|
@ -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
|
||||
|
@ -74,15 +74,15 @@ ifdef PROFILE
|
|||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
CXXFLAGS += -g
|
||||
CXXFLAGS += -g
|
||||
else
|
||||
ifdef HAVE_GCC
|
||||
CXXFLAGS+= -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ifdef HAVE_CLANG
|
||||
CXXFLAGS+= -fomit-frame-pointer
|
||||
endif
|
||||
ifdef HAVE_CLANG
|
||||
CXXFLAGS+= -fomit-frame-pointer
|
||||
endif
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue