Skip to content

Commit

Permalink
GUI2 Tests: directly initialize a vector
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Apr 28, 2017
1 parent 2a6ca6c commit a4b3f72
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/tests/gui/test_gui2.cpp
Expand Up @@ -324,13 +324,13 @@ namespace {

const tresolution_list& get_gui_resolutions()
{
static tresolution_list result;
if(result.empty()) {
result.push_back(std::make_pair(800, 600));
result.push_back(std::make_pair(1024, 768));
result.push_back(std::make_pair(1280, 1024));
result.push_back(std::make_pair(1680, 1050));
}
static tresolution_list result {
{800, 600}
{1024, 768}
{1280, 1024}
{1680, 1050}
};

return result;
}

Expand Down

1 comment on commit a4b3f72

@matthiaskrgr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang does not like this

...
ling-calls -O3   -I/usr/include/SDL2 -D_REENTRANT -DWESNOTH_PATH=\"/usr/local/share/wesnoth\" -DLOCALEDIR=\"translations\" -DFIFODIR=\"/var/run/wesnothd\" -MD -MT src/CMakeFiles/test.dir/tests/gui/test_gui2.cpp.o -MF src/CMakeFiles/test.dir/tests/gui/test_gui2.cpp.o.d -o src/CMakeFiles/test.dir/tests/gui/test_gui2.cpp.o -c ../src/tests/gui/test_gui2.cpp
../src/tests/gui/test_gui2.cpp:329:3: error: expected '}'
                {1024, 768}
                ^
../src/tests/gui/test_gui2.cpp:327:33: note: to match this '{'
        static tresolution_list result {
                                       ^
1 error generated.

Please sign in to comment.