Skip to content

Commit

Permalink
Clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCycoONE committed Nov 10, 2024
1 parent 1b302ab commit e6e4bdf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
8 changes: 6 additions & 2 deletions CorsixTH/Src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@ std::string search_script_file(lua_State* L) {
if (iProgramPathLengthReal != iProgramPathLength ||
iProgramPathLength <= iProgramDirLength) {
if (iProgramPathLengthReal != iProgramPathLength)
spdlog::error("Path length of CorsixTH binary changed?!?! Old: {}, new: {}", iProgramPathLength, iProgramPathLengthReal);
spdlog::error(
"Path length of CorsixTH binary changed?!?! Old: {}, new: {}",
iProgramPathLength, iProgramPathLengthReal);
else
spdlog::error("Path to CorsixTH looks like a directory?!?! Path is: '{}'.", sProgramDir);
spdlog::error(
"Path to CorsixTH looks like a directory?!?! Path is: '{}'.",
sProgramDir);
spdlog::shutdown();
exit(255);
}
Expand Down
4 changes: 2 additions & 2 deletions CorsixTH/Src/sdl_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ SOFTWARE.

#include "config.h"

#include <spdlog/spdlog.h>

#include <array>
#include <cstdio>
#include <cstring>

#include <spdlog/spdlog.h>

#include "SDL_error.h"
#include "lua_sdl.h"
#include "th_lua.h"
Expand Down
4 changes: 2 additions & 2 deletions CorsixTH/Src/th_gfx_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ SOFTWARE.
#include "th_gfx_font.h"
#endif

#include <spdlog/spdlog.h>

#include <algorithm>
#include <cmath>
#include <cstdio>
Expand All @@ -39,8 +41,6 @@ SOFTWARE.
#include <new>
#include <stdexcept>

#include <spdlog/spdlog.h>

#include "th_map.h"

#if SDL_VERSION_ATLEAST(2, 0, 10)
Expand Down
2 changes: 1 addition & 1 deletion CorsixTH/Src/th_lua_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ uint8_t range_scale(uint16_t low, uint16_t high, uint16_t val, uint16_t start,
}

inline bool is_wall(uint16_t blk) {
return ((82 <= ((blk)&0xFF)) && (((blk)&0xFF) <= 164));
return ((82 <= ((blk) & 0xFF)) && (((blk) & 0xFF) <= 164));
}

inline bool is_wall_drawn(const level_map& map, const map_tile& node,
Expand Down
8 changes: 5 additions & 3 deletions CorsixTH/Src/th_movie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ void movie_picture_buffer::allocate(SDL_Renderer* pRenderer, int iWidth,
int iHeight) {
if (texture) {
SDL_DestroyTexture(texture);
spdlog::error("movie_player overlay should be deallocated before being "
"allocated!");
spdlog::error(
"movie_player overlay should be deallocated before being "
"allocated!");
}
texture = SDL_CreateTexture(pRenderer, SDL_PIXELFORMAT_RGB24,
SDL_TEXTUREACCESS_STREAMING, iWidth, iHeight);
Expand Down Expand Up @@ -460,7 +461,8 @@ void movie_player::play_audio(int requested_audio_channel) {
target_channel_layout = AV_CH_LAYOUT_7POINT1;
break;
default:
spdlog::warn("Unsupported channel layout {}. Please report issue.", mixer_channels);
spdlog::warn("Unsupported channel layout {}. Please report issue.",
mixer_channels);
target_channel_layout = 0;
}

Expand Down

0 comments on commit e6e4bdf

Please sign in to comment.