Fixed a few warnings from clang.

This commit is contained in:
Stephen Anthony 2020-11-30 15:46:50 -03:30
parent 833ce27d37
commit 1f55d2fb10
4 changed files with 6 additions and 4 deletions

View File

@ -470,6 +470,7 @@ Int32 HighScoresManager::convert(Int32 val, uInt32 maxVal, bool isBCD, bool zero
return val;
}
#if 0
void replaceAll(std::string& str, const std::string& from, const std::string& to) {
if(from.empty())
return;
@ -479,6 +480,7 @@ void replaceAll(std::string& str, const std::string& from, const std::string& to
start_pos += to.length(); // In case 'to' contains 'from', like replacing 'x' with 'yx'
}
}
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool HighScoresManager::getPropBool(const json& jprops, const string& key,

View File

@ -21,7 +21,7 @@
class OSystem;
#include "Props.hxx"
#include "json.hxx"
#include "json_lib.hxx"
using json = nlohmann::json;

View File

@ -127,7 +127,7 @@ bool EditableWidget::tryInsertChar(char c, int pos)
if(_filter(tolower(c)))
{
killSelectedText();
if(!_maxLen || _editString.length() < _maxLen)
if(!_maxLen || static_cast<int>(_editString.length()) < _maxLen)
{
myUndoHandler->doChar(); // aggregate single chars
_editString.insert(pos, 1, c);

View File

@ -29,8 +29,8 @@
#include "HighScoresDialog.hxx"
static constexpr int BUTTON_GFX_W = 10, BUTTON_GFX_H = 10;
static constexpr int BUTTON_GFX_W_LARGE = 16, BUTTON_GFX_H_LARGE = 16;
static constexpr int BUTTON_GFX_H = 10;
static constexpr int BUTTON_GFX_H_LARGE = 16;
static constexpr std::array<uInt32, BUTTON_GFX_H> PREV_GFX = {
0b0000110000,