1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

mapeditor/mainwindow.cpp: use '%s' (not '%b') for string formatter

mapeditor/mainwindow.cpp: In member function
      'void MainWindow::onSelectionMade(int, bool)':
    mapeditor/mainwindow.cpp:1014:47:
      warning: format '%b' expects argument of type 'unsigned int',
      but argument 3 has type 'const char*' [-Wformat=]
     1014 |                 auto info = QString::asprintf(
         "Selection on layer %d: %b", level, anythingSelected ? "true" : "false");
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                    |
         |                                                    const char*
This commit is contained in:
Sergei Trofimovich 2022-11-05 20:25:51 +00:00
parent ae1d2c50e2
commit 560c528ec8

View File

@ -1011,7 +1011,7 @@ void MainWindow::onSelectionMade(int level, bool anythingSelected)
{
if (level == mapLevel)
{
auto info = QString::asprintf("Selection on layer %d: %b", level, anythingSelected ? "true" : "false");
auto info = QString::asprintf("Selection on layer %d: %s", level, anythingSelected ? "true" : "false");
setStatusMessage(info);
ui->actionErase->setEnabled(anythingSelected);