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
2
Makefile
2
Makefile
|
@ -50,7 +50,7 @@ else
|
||||||
CXXFLAGS:= -O2 -x c++
|
CXXFLAGS:= -O2 -x c++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers
|
CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter
|
||||||
|
|
||||||
ifdef HAVE_GCC
|
ifdef HAVE_GCC
|
||||||
CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=c++14
|
CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=c++14
|
||||||
|
|
|
@ -439,7 +439,7 @@ namespace StellaModTest
|
||||||
|
|
||||||
namespace StellaKeyName
|
namespace StellaKeyName
|
||||||
{
|
{
|
||||||
inline const char* const forKey(StellaKey key)
|
inline const char* forKey(StellaKey key)
|
||||||
{
|
{
|
||||||
#ifdef SDL_SUPPORT
|
#ifdef SDL_SUPPORT
|
||||||
return SDL_GetScancodeName(SDL_Scancode(key));
|
return SDL_GetScancodeName(SDL_Scancode(key));
|
||||||
|
|
|
@ -56,23 +56,23 @@ class Variant
|
||||||
|
|
||||||
// Conversion methods
|
// Conversion methods
|
||||||
const string& toString() const { return data; }
|
const string& toString() const { return data; }
|
||||||
const char* const toCString() const { return data.c_str(); }
|
const char* toCString() const { return data.c_str(); }
|
||||||
const Int32 toInt() const {
|
Int32 toInt() const {
|
||||||
istringstream ss(data);
|
istringstream ss(data);
|
||||||
Int32 parsed;
|
Int32 parsed;
|
||||||
ss >> parsed;
|
ss >> parsed;
|
||||||
|
|
||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
const float toFloat() const {
|
float toFloat() const {
|
||||||
istringstream ss(data);
|
istringstream ss(data);
|
||||||
float parsed;
|
float parsed;
|
||||||
ss >> parsed;
|
ss >> parsed;
|
||||||
|
|
||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
const bool toBool() const { return data == "1" || data == "true"; }
|
bool toBool() const { return data == "1" || data == "true"; }
|
||||||
const Common::Size toSize() const { return Common::Size(data); }
|
Common::Size toSize() const { return Common::Size(data); }
|
||||||
|
|
||||||
// Comparison
|
// Comparison
|
||||||
bool operator==(const Variant& v) const { return data == v.data; }
|
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
|
// Make sure we have enough data
|
||||||
// If we're at or past the end, we're done
|
// 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);
|
bool readStream(ByteBuffer& out, uInt64 offset, uInt64 length, uInt64& actual);
|
||||||
|
|
||||||
/** Return the next entry in the ZIP file */
|
/** 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 */
|
/** Decompress the most recently found file in the ZIP into target buffer */
|
||||||
void decompress(ByteBuffer& out, uInt64 length);
|
void decompress(ByteBuffer& out, uInt64 length);
|
||||||
|
|
|
@ -37,7 +37,7 @@ class GameList
|
||||||
{ return i < myArray.size() ? myArray[i]._path : EmptyString; }
|
{ return i < myArray.size() ? myArray[i]._path : EmptyString; }
|
||||||
const string& md5(uInt32 i) const
|
const string& md5(uInt32 i) const
|
||||||
{ return i < myArray.size() ? myArray[i]._md5 : EmptyString; }
|
{ 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; }
|
{ return i < myArray.size() ? myArray[i]._isdir: false; }
|
||||||
|
|
||||||
void setMd5(uInt32 i, const string& md5)
|
void setMd5(uInt32 i, const string& md5)
|
||||||
|
|
Loading…
Reference in New Issue