Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into renderpath_redo
Browse files Browse the repository at this point in the history
  • Loading branch information
aginor committed Jun 2, 2016
2 parents f2e9dec + ac8d026 commit 0f3b4c7
Show file tree
Hide file tree
Showing 23 changed files with 107 additions and 77 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Expand Up @@ -13,7 +13,7 @@ env:
- OPT=-O2 CXXSTD=11 NLS=false
- OPT=-O2 CXXSTD=1y NLS=false
- NLS=true

- OPT=-O0 CXXSTD=11 NLS=false USE_CMAKE=true
matrix:
exclude:
- compiler: gcc
Expand Down Expand Up @@ -46,7 +46,7 @@ before_install:
install:
- if [ "$CXXSTD" == "1y" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; fi
- travis_wait sudo apt-get update -qq
- travis_wait sudo apt-get install -qq libboost-filesystem-dev libboost-iostreams-dev libboost-random-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-test-dev libboost-locale-dev libboost-thread-dev libcairo2-dev libfribidi-dev libpango1.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev gdb moreutils scons xvfb
- travis_wait sudo apt-get install -qq libboost-filesystem-dev libboost-iostreams-dev libboost-random-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-test-dev libboost-locale-dev libboost-thread-dev libcairo2-dev libfribidi-dev libpango1.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev gdb moreutils scons xvfb cmake

- if [ "$CXXSTD" == "1y" ]; then
sudo apt-get install -qq g++-5;
Expand All @@ -60,7 +60,8 @@ script:
- ./utils/travis/check_utf8.sh
- ./utils/travis/utf8_bom_dog.sh
- $CXX --version
- scons cxxtool=$CXX --debug=time build=release extra_flags_config=-pipe extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx_std=$CXXSTD nls=$NLS jobs=2
- if [ "$USE_CMAKE" = false ]; then scons cxxtool=$CXX --debug=time build=release extra_flags_config=-pipe extra_flags_release="$EXTRA_FLAGS_RELEASE" strict=$STRICT_COMPILATION $TARGETS cxx_std=$CXXSTD nls=$NLS jobs=2; fi
- if [ "$USE_CMAKE" = true ]; then cmake . -DENABLE_STRICT_COMPILATION=$STRICT_COMPILATION -DENABLE_NLS=$NLS && make -j2; fi
- "export DISPLAY=:99.0"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1024x768x24"
- if [ "$CPP_TESTS" = true ]; then ./utils/travis/test_wrapper.sh; fi
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Expand Up @@ -252,10 +252,6 @@ if(NOT MSVC)
check_compiler_has_flag(CXX_FLAGS_PROJECT "-Wall" HAS_COMPILER_FLAG_WALL)
endif(NOT MSVC)

### Set some extra var for C++11
add_definitions(-DHAVE_CXX0X)


### Set strict compiler flags.

set(CXX_FLAGS_STRICT_COMPILATION)
Expand Down
5 changes: 2 additions & 3 deletions SConstruct
Expand Up @@ -387,6 +387,7 @@ if env["prereqs"]:
conf.CheckBoost("iostreams", require_version = "1.34.1") & \
conf.CheckBoostIostreamsGZip() & \
conf.CheckBoostIostreamsBZip2() & \
CheckAsio(conf) & \
conf.CheckBoost("random",require_version = "1.40.0") & \
conf.CheckBoost("smart_ptr", header_only = True) & \
conf.CheckBoost("system") & \
Expand All @@ -409,7 +410,6 @@ if env["prereqs"]:
conf.CheckOgg() & \
conf.CheckPNG() & \
conf.CheckJPG() & \
CheckAsio(conf) & \
conf.CheckPango("cairo", require_version = "1.21.3") & \
conf.CheckPKG("fontconfig") & \
conf.CheckBoost("program_options", require_version="1.35.0") & \
Expand Down Expand Up @@ -505,13 +505,12 @@ for env in [test_env, campaignd_env, client_env, env]:
env.AppendUnique(CCFLAGS = Split("-W -Wall"), CFLAGS = ["-std=c99"])

env.AppendUnique(CXXFLAGS = "-std=c++" + env["cxx_std"])
env.Append(CPPDEFINES = "HAVE_CXX0X")

if env['openmp']:
env.AppendUnique(CXXFLAGS = ["-fopenmp"], LIBS = ["gomp"])

if env['strict']:
env.AppendUnique(CCFLAGS = Split("-Werror $(-Wno-unused-local-typedefs$)"))
env.AppendUnique(CCFLAGS = Split("-Werror -Wold-style-cast $(-Wno-unused-local-typedefs$)"))

env["OPT_FLAGS"] = "-O2"
env["DEBUG_FLAGS"] = Split("-O0 -DDEBUG -ggdb3")
Expand Down
1 change: 1 addition & 0 deletions projectfiles/CodeBlocks/wesnoth.cbp
Expand Up @@ -320,6 +320,7 @@
<Unit filename="../../src/filesystem.hpp" />
<Unit filename="../../src/filesystem_boost.cpp" />
<Unit filename="../../src/filesystem_common.cpp" />
<Unit filename="../../src/filesystem_sdl.cpp" />
<Unit filename="../../src/floating_label.cpp" />
<Unit filename="../../src/floating_label.hpp" />
<Unit filename="../../src/floating_point_emulation.hpp" />
Expand Down
10 changes: 4 additions & 6 deletions projectfiles/CodeBlocks/wesnothd.cbp
Expand Up @@ -49,6 +49,7 @@
<Add library="SDL2" />
<Add library="SDL2_net" />
<Add library="ws2_32" />
<Add library="wsock32" />
<Add library="libboost_iostreams-mgw51-mt-1_58.a" />
<Add library="libboost_bzip2-mgw51-mt-1_58.a" />
<Add library="libboost_filesystem-mgw51-mt-1_58.a" />
Expand All @@ -67,19 +68,18 @@
<Unit filename="../../src/filesystem.hpp" />
<Unit filename="../../src/filesystem_boost.cpp" />
<Unit filename="../../src/filesystem_common.cpp" />
<Unit filename="../../src/filesystem_sdl.cpp" />
<Unit filename="../../src/filesystem_win32.ii" />
<Unit filename="../../src/game_config.cpp" />
<Unit filename="../../src/game_config.hpp" />
<Unit filename="../../src/gettext.hpp" />
<Unit filename="../../src/gettext_boost.cpp" />
<Unit filename="../../src/global.hpp" />
<Unit filename="../../src/libc_error.hpp" />
<Unit filename="../../src/loadscreen.hpp" />
<Unit filename="../../src/log.cpp" />
<Unit filename="../../src/log.hpp" />
<Unit filename="../../src/log_windows.cpp" />
<Unit filename="../../src/log_windows.hpp" />
<Unit filename="../../src/map.hpp" />
<Unit filename="../../src/mt_rng.cpp" />
<Unit filename="../../src/mt_rng.hpp" />
<Unit filename="../../src/network.cpp" />
Expand Down Expand Up @@ -113,13 +113,11 @@
<Unit filename="../../src/server/metrics.hpp" />
<Unit filename="../../src/server/player.cpp" />
<Unit filename="../../src/server/player.hpp" />
<Unit filename="../../src/server/player_connection.cpp" />
<Unit filename="../../src/server/player_connection.hpp" />
<Unit filename="../../src/server/player_network.cpp" />
<Unit filename="../../src/server/player_network.hpp" />
<Unit filename="../../src/server/proxy.cpp" />
<Unit filename="../../src/server/proxy.hpp" />
<Unit filename="../../src/server/room.cpp" />
<Unit filename="../../src/server/room.hpp" />
<Unit filename="../../src/server/room_manager.cpp" />
<Unit filename="../../src/server/room_manager.hpp" />
<Unit filename="../../src/server/sample_user_handler.cpp" />
<Unit filename="../../src/server/sample_user_handler.hpp" />
Expand Down
3 changes: 3 additions & 0 deletions projectfiles/VC12/wesnoth.vcxproj
Expand Up @@ -1113,6 +1113,9 @@
<ClCompile Include="..\..\src\fake_unit_manager.cpp" />
<ClCompile Include="..\..\src\fake_unit_ptr.cpp" />
<ClCompile Include="..\..\src\filechooser.cpp" />
<ClCompile Include="..\..\src\filesystem_boost.cpp" />
<ClCompile Include="..\..\src\filesystem_common.cpp" />
<ClCompile Include="..\..\src\filesystem_sdl.cpp" />
<ClCompile Include="..\..\src\floating_label.cpp" />
<ClCompile Include="..\..\src\floating_textbox.cpp" />
<ClCompile Include="..\..\src\font.cpp" />
Expand Down
3 changes: 3 additions & 0 deletions projectfiles/VC12/wesnoth.vcxproj.filters
Expand Up @@ -1389,6 +1389,9 @@
<ClCompile Include="..\..\src\fake_unit_manager.cpp" />
<ClCompile Include="..\..\src\fake_unit_ptr.cpp" />
<ClCompile Include="..\..\src\filechooser.cpp" />
<ClCompile Include="..\..\src\filesystem_boost.cpp" />
<ClCompile Include="..\..\src\filesystem_common.cpp" />
<ClCompile Include="..\..\src\filesystem_sdl.cpp" />
<ClCompile Include="..\..\src\floating_label.cpp" />
<ClCompile Include="..\..\src\floating_textbox.cpp" />
<ClCompile Include="..\..\src\font.cpp" />
Expand Down
47 changes: 38 additions & 9 deletions projectfiles/VC12/wesnothd.vcxproj
Expand Up @@ -205,7 +205,12 @@
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\forum_user_handler.cpp" />
<ClCompile Include="..\..\src\server\forum_user_handler.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\game.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
Expand All @@ -230,16 +235,36 @@
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\player_network.cpp" />
<ClCompile Include="..\..\src\server\proxy.cpp">
<ClCompile Include="..\..\src\server\player_connection.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\player_network.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\room.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\room_manager.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\sample_user_handler.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\room.cpp" />
<ClCompile Include="..\..\src\server\room_manager.cpp" />
<ClCompile Include="..\..\src\server\sample_user_handler.cpp" />
<ClCompile Include="..\..\src\server\server.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
Expand All @@ -253,10 +278,14 @@
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
<ClCompile Include="..\..\src\server\user_handler.cpp" />
<ClCompile Include="..\..\src\server\user_handler.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_with_VLD|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseDEBUG|Win32'">$(IntDir)Server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)Server\</ObjectFileName>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\global.hpp" />
<ClInclude Include="..\..\src\mt_rng.hpp" />
<ClInclude Include="..\..\src\seed_rng.hpp" />
<ClInclude Include="..\..\src\server\ban.hpp" />
Expand All @@ -265,8 +294,8 @@
<ClInclude Include="..\..\src\server\input_stream.hpp" />
<ClInclude Include="..\..\src\server\metrics.hpp" />
<ClInclude Include="..\..\src\server\player.hpp" />
<ClInclude Include="..\..\src\server\player_connection.hpp" />
<ClInclude Include="..\..\src\server\player_network.hpp" />
<ClInclude Include="..\..\src\server\proxy.hpp" />
<ClInclude Include="..\..\src\server\room.hpp" />
<ClInclude Include="..\..\src\server\room_manager.hpp" />
<ClInclude Include="..\..\src\server\sample_user_handler.hpp" />
Expand Down
11 changes: 4 additions & 7 deletions projectfiles/VC12/wesnothd.vcxproj.filters
Expand Up @@ -42,10 +42,10 @@
<ClCompile Include="..\..\src\server\player.cpp">
<Filter>Server</Filter>
</ClCompile>
<ClCompile Include="..\..\src\server\player_network.cpp">
<ClCompile Include="..\..\src\server\player_connection.cpp">
<Filter>Server</Filter>
</ClCompile>
<ClCompile Include="..\..\src\server\proxy.cpp">
<ClCompile Include="..\..\src\server\player_network.cpp">
<Filter>Server</Filter>
</ClCompile>
<ClCompile Include="..\..\src\server\room.cpp">
Expand Down Expand Up @@ -79,9 +79,6 @@
<ClInclude Include="..\..\src\server\game.hpp">
<Filter>Server</Filter>
</ClInclude>
<ClInclude Include="..\..\src\global.hpp">
<Filter>Server</Filter>
</ClInclude>
<ClInclude Include="..\..\src\server\input_stream.hpp">
<Filter>Server</Filter>
</ClInclude>
Expand All @@ -91,10 +88,10 @@
<ClInclude Include="..\..\src\server\player.hpp">
<Filter>Server</Filter>
</ClInclude>
<ClInclude Include="..\..\src\server\player_network.hpp">
<ClInclude Include="..\..\src\server\player_connection.hpp">
<Filter>Server</Filter>
</ClInclude>
<ClInclude Include="..\..\src\server\proxy.hpp">
<ClInclude Include="..\..\src\server\player_network.hpp">
<Filter>Server</Filter>
</ClInclude>
<ClInclude Include="..\..\src\server\room.hpp">
Expand Down
8 changes: 4 additions & 4 deletions src/SDL_SavePNG/savepng.cpp
Expand Up @@ -35,7 +35,7 @@ static void png_error_SDL(png_structp /*ctx*/, png_const_charp str)
}
static void png_write_SDL(png_structp png_ptr, png_bytep data, png_size_t length)
{
SDL_RWops *rw = (SDL_RWops*)png_get_io_ptr(png_ptr);
SDL_RWops *rw = static_cast<SDL_RWops*>(png_get_io_ptr(png_ptr));
SDL_RWwrite(rw, data, sizeof(png_byte), length);
}

Expand Down Expand Up @@ -114,7 +114,7 @@ int SDL_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst)
&& (pal = surface->format->palette))
{
colortype |= PNG_COLOR_MASK_PALETTE;
pal_ptr = (png_colorp)malloc(pal->ncolors * sizeof(png_color));
pal_ptr = static_cast<png_colorp>(malloc(pal->ncolors * sizeof(png_color)));
for (i = 0; i < pal->ncolors; i++) {
pal_ptr[i].red = pal->colors[i].r;
pal_ptr[i].green = pal->colors[i].g;
Expand All @@ -140,9 +140,9 @@ int SDL_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst)
/* Write everything */
png_write_info(png_ptr, info_ptr);
#ifdef USE_ROW_POINTERS
row_pointers = (png_bytep*) malloc(sizeof(png_bytep)*surface->h);
row_pointers = static_cast<png_bytep*> (malloc(sizeof(png_bytep)*surface->h));
for (i = 0; i < surface->h; i++)
row_pointers[i] = (png_bytep)(Uint8*)surface->pixels + i * surface->pitch;
row_pointers[i] = static_cast<png_bytep>(static_cast<Uint8*>(surface->pixels)) + i * surface->pitch;
png_write_image(png_ptr, row_pointers);
free(row_pointers);
#else
Expand Down
2 changes: 1 addition & 1 deletion src/editor/controller/editor_controller.cpp
Expand Up @@ -97,7 +97,7 @@ editor_controller::editor_controller(const config &game_config, CVideo& video)
void editor_controller::init_gui()
{
gui_->change_display_context(&context_manager_->get_map_context());
gui_->set_grid(preferences::grid());
preferences::set_preference_display_settings();
gui_->add_redraw_observer(std::bind(&editor_controller::display_redraw_callback, this, _1));
floating_label_manager_.reset(new font::floating_label_context());
gui().set_draw_coordinates(preferences::editor::draw_hex_coordinates());
Expand Down
6 changes: 5 additions & 1 deletion src/lua/SConscript
Expand Up @@ -37,8 +37,12 @@ linit.cpp
""")
liblua = env.Library("lua", lua_sources,
# Silence some Clang-specific warnings due to extra parentheses in if statements when comparing.
CCFLAGS = ["$CCFLAGS", "clang" in env["CXX"] and Split("-Wno-parentheses-equality -Wno-pointer-bool-conversion") or []],
CCFLAGS = ["$CCFLAGS", "clang" in env["CXX"] and Split("-Wno-parentheses-equality -Wno-pointer-bool-conversion") or [], "strict" in env and Split("-Wno-old-style-cast -Wno-useless-cast") or []],
CCCOM = env["CXXCOM"],
CPPPATH = ["$CPPPATH", Dir(".").srcnode()],
CPPDEFINES = ["$CPPDEFINES", env["PLATFORM"] != "win32" and "LUA_USE_POSIX" or []])

#if env['strict']:
# env.AppendUnique(CCFLAGS = Split("-Wno-old-style-cast -Wno-useless-cast"))

Return("liblua")
4 changes: 2 additions & 2 deletions src/network_worker.cpp
Expand Up @@ -398,7 +398,7 @@ static SOCKET_STATE send_buffer(TCPsocket sock, std::vector<char>& buf, int in_s
}

#ifdef USE_POLL
struct pollfd fd = { ((_TCPsocket*)sock)->channel, POLLOUT, 0 };
struct pollfd fd = { (reinterpret_cast<_TCPsocket*>(sock))->channel, POLLOUT, 0 };
int poll_res;
do {
poll_res = poll(&fd, 1, 60000);
Expand Down Expand Up @@ -780,7 +780,7 @@ manager::manager(size_t p_min_threads,size_t p_max_threads) : active_(!managed)
for(size_t shard = 0; shard != NUM_SHARDS; ++shard) {
const threading::lock lock(*shard_mutexes[shard]);
for(size_t n = 0; n != p_min_threads; ++n) {
threading::thread * tmp = new threading::thread(process_queue,(void*)(shard));
threading::thread * tmp = new threading::thread(process_queue,reinterpret_cast<void*>(shard));
threads[shard][tmp->get_id()] = tmp;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/play_controller.cpp
Expand Up @@ -350,6 +350,7 @@ void play_controller::reset_gamestate(const config& level, int replay_pos)
void play_controller::init_managers()
{
LOG_NG << "initializing managers... " << (SDL_GetTicks() - ticks()) << std::endl;
preferences::set_preference_display_settings();
tooltips_manager_.reset(new tooltips::manager(gui_->video()));
soundsources_manager_.reset(new soundsource::manager(*gui_));

Expand Down
4 changes: 2 additions & 2 deletions src/preferences.cpp
Expand Up @@ -341,7 +341,7 @@ bool scroll_to_action()
return get("scroll_to_action", true);
}

void _set_scroll_to_action(bool ison)
void set_scroll_to_action(bool ison)
{
prefs["scroll_to_action"] = ison;
}
Expand Down Expand Up @@ -470,7 +470,7 @@ bool ellipses()
return get("show_side_colors", false);
}

void _set_ellipses(bool ison)
void set_ellipses(bool ison)
{
preferences::set("show_side_colors", ison);
}
Expand Down
4 changes: 2 additions & 2 deletions src/preferences.hpp
Expand Up @@ -62,7 +62,7 @@ namespace preferences {
void set_core_id(const std::string& root);

bool scroll_to_action();
void _set_scroll_to_action(bool ison);
void set_scroll_to_action(bool ison);

int min_allowed_width();
int min_allowed_height();
Expand Down Expand Up @@ -247,7 +247,7 @@ namespace preferences {
void set_show_fps(bool value);

bool ellipses();
void _set_ellipses(bool ison);
void set_ellipses(bool ison);

bool grid();
void _set_grid(bool ison);
Expand Down

0 comments on commit 0f3b4c7

Please sign in to comment.