Skip to content

Commit

Permalink
style: Revisit header guards
Browse files Browse the repository at this point in the history
  • Loading branch information
oboukli committed Jan 4, 2025
1 parent 6762d9a commit 82e3432
Show file tree
Hide file tree
Showing 25 changed files with 75 additions and 75 deletions.
6 changes: 3 additions & 3 deletions include/tromino/core/tromino.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/* SPDX-License-Identifier: MIT */

#ifndef TROMINO_CORE_TROMINO_H
#define TROMINO_CORE_TROMINO_H
#ifndef TROMINO_CORE_TROMINO_H_
#define TROMINO_CORE_TROMINO_H_

#ifdef __cplusplus
extern "C" {
Expand All @@ -47,4 +47,4 @@ void trmn_solve_puzzle(
}
#endif /* __cplusplus */

#endif /* TROMINO_CORE_TROMINO_H */
#endif /* TROMINO_CORE_TROMINO_H_ */
6 changes: 3 additions & 3 deletions include/tromino/gfx2d/board.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef TROMINO_GFX2D_BOARD_HPP
#define TROMINO_GFX2D_BOARD_HPP
#ifndef TROMINO_GFX2D_BOARD_HPP_
#define TROMINO_GFX2D_BOARD_HPP_

#include <cstddef>

Expand All @@ -20,4 +20,4 @@ struct Board {

} // namespace tromino::gfx2d

#endif // TROMINO_GFX2D_BOARD_HPP
#endif // TROMINO_GFX2D_BOARD_HPP_
6 changes: 3 additions & 3 deletions include/tromino/gfx2d/gfx2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef TROMINO_GFX2D_GFX2D_HPP
#define TROMINO_GFX2D_GFX2D_HPP
#ifndef TROMINO_GFX2D_GFX2D_HPP_
#define TROMINO_GFX2D_GFX2D_HPP_

#include <SDL2/SDL.h>

Expand Down Expand Up @@ -49,4 +49,4 @@ void DrawTrominoOutline(

} // namespace tromino::gfx2d

#endif // TROMINO_GFX2D_GFX2D_HPP
#endif // TROMINO_GFX2D_GFX2D_HPP_
6 changes: 3 additions & 3 deletions include/tromino/gfx2d/step.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef TROMINO_GFX2D_STEP_HPP
#define TROMINO_GFX2D_STEP_HPP
#ifndef TROMINO_GFX2D_STEP_HPP_
#define TROMINO_GFX2D_STEP_HPP_

namespace tromino::gfx2d {

Expand Down Expand Up @@ -36,4 +36,4 @@ class Step final {

} // namespace tromino::gfx2d

#endif // TROMINO_GFX2D_STEP_HPP
#endif // TROMINO_GFX2D_STEP_HPP_
6 changes: 3 additions & 3 deletions include/tromino/gfx2d/style.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef TROMINO_GFX2D_STYLE_HPP
#define TROMINO_GFX2D_STYLE_HPP
#ifndef TROMINO_GFX2D_STYLE_HPP_
#define TROMINO_GFX2D_STYLE_HPP_

#include <SDL2/SDL.h>

Expand All @@ -22,4 +22,4 @@ struct Style {

} // namespace tromino::gfx2d

#endif // TROMINO_GFX2D_STYLE_HPP
#endif // TROMINO_GFX2D_STYLE_HPP_
6 changes: 3 additions & 3 deletions include/tromino/gfx2d/view_model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef TROMINO_GFX2D_VIEW_MODEL_HPP
#define TROMINO_GFX2D_VIEW_MODEL_HPP
#ifndef TROMINO_GFX2D_VIEW_MODEL_HPP_
#define TROMINO_GFX2D_VIEW_MODEL_HPP_

#include <SDL2/SDL.h>

Expand Down Expand Up @@ -84,4 +84,4 @@ get_flip(int flip_x, int flip_y) noexcept

} // namespace tromino::gfx2d

#endif // TROMINO_GFX2D_VIEW_MODEL_HPP
#endif // TROMINO_GFX2D_VIEW_MODEL_HPP_
6 changes: 3 additions & 3 deletions include/tromino/gfx2d/window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef TROMINO_GFX2D_WINDOW_HPP
#define TROMINO_GFX2D_WINDOW_HPP
#ifndef TROMINO_GFX2D_WINDOW_HPP_
#define TROMINO_GFX2D_WINDOW_HPP_

#include <SDL2/SDL.h>

Expand Down Expand Up @@ -41,4 +41,4 @@ class [[nodiscard]] Window final {

} // namespace tromino::gfx2d

#endif // TROMINO_GFX2D_WINDOW_HPP
#endif // TROMINO_GFX2D_WINDOW_HPP_
6 changes: 3 additions & 3 deletions include/tromino/validation/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/* SPDX-License-Identifier: MIT */

#ifndef TROMINO_VALIDATION_VALIDATION_H
#define TROMINO_VALIDATION_VALIDATION_H
#ifndef TROMINO_VALIDATION_VALIDATION_H_
#define TROMINO_VALIDATION_VALIDATION_H_

#include <stdbool.h>

Expand All @@ -45,4 +45,4 @@ bool trmn_is_valid_config(int order, int x, int y);
}
#endif /* __cplusplus */

#endif /* TROMINO_VALIDATION_VALIDATION_H */
#endif /* TROMINO_VALIDATION_VALIDATION_H_ */
6 changes: 3 additions & 3 deletions src/cli/cli_models.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_MODELS_HPP
#define CLI_MODELS_HPP
#ifndef CLI_CLI_MODELS_HPP_
#define CLI_CLI_MODELS_HPP_

namespace tromino::cli {

Expand All @@ -28,4 +28,4 @@ struct options {

} // namespace tromino::cli

#endif // CLI_MODELS_HPP
#endif // CLI_CLI_MODELS_HPP_
6 changes: 3 additions & 3 deletions src/cli/cli_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_OPTIONS_HPP
#define CLI_OPTIONS_HPP
#ifndef CLI_CLI_OPTIONS_HPP_
#define CLI_CLI_OPTIONS_HPP_

#include "cli_models.hpp"

Expand All @@ -22,4 +22,4 @@ bool read_options(

} // namespace tromino::cli

#endif // CLI_OPTIONS_HPP
#endif // CLI_CLI_OPTIONS_HPP_
6 changes: 3 additions & 3 deletions src/cli/init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_INIT_HPP
#define CLI_INIT_HPP
#ifndef CLI_INIT_HPP_
#define CLI_INIT_HPP_

#include "cli_models.hpp"

Expand All @@ -19,4 +19,4 @@ void init(int order, int x, int y, emulation_mode_type emulation_mode) noexcept;

} // namespace tromino::cli::app

#endif // CLI_INIT_HPP
#endif // CLI_INIT_HPP_
6 changes: 3 additions & 3 deletions src/cli/params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_PARAMS_HPP
#define CLI_PARAMS_HPP
#ifndef CLI_PARAMS_HPP_
#define CLI_PARAMS_HPP_

#include <cstddef>

Expand All @@ -23,4 +23,4 @@ constexpr std::size_t const USE_WCH_ARG_IDX{4U};

} // namespace tromino::cli::params

#endif // CLI_PARAMS_HPP
#endif // CLI_PARAMS_HPP_
6 changes: 3 additions & 3 deletions src/cli/trmn_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_TRMN_GRAPH_HPP
#define CLI_TRMN_GRAPH_HPP
#ifndef CLI_TRMN_GRAPH_HPP_
#define CLI_TRMN_GRAPH_HPP_

#ifdef _WIN64
#define WIN32_LEAN_AND_MEAN
Expand Down Expand Up @@ -122,4 +122,4 @@ get_sprite(int const flip_x, int const flip_y) noexcept

} // namespace tromino::cli

#endif // CLI_TRMN_GRAPH_HPP
#endif // CLI_TRMN_GRAPH_HPP_
6 changes: 3 additions & 3 deletions src/cli/trmn_graph_vt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_TRMN_GRAPH_VT_HPP
#define CLI_TRMN_GRAPH_VT_HPP
#ifndef CLI_TRMN_GRAPH_VT_HPP_
#define CLI_TRMN_GRAPH_VT_HPP_

#include <iostream>

Expand All @@ -17,4 +17,4 @@ void use_vt(board_t& tromino_board, std::ostream& os) noexcept;

} // namespace tromino::cli::vt

#endif // CLI_TRMN_GRAPH_VT_HPP
#endif // CLI_TRMN_GRAPH_VT_HPP_
6 changes: 3 additions & 3 deletions src/cli/trmn_graph_windows.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_TRMN_GRAPH_WINDOWS_HPP
#define CLI_TRMN_GRAPH_WINDOWS_HPP
#ifndef CLI_TRMN_GRAPH_WINDOWS_HPP_
#define CLI_TRMN_GRAPH_WINDOWS_HPP_

#ifndef _WIN64
#error "Included Windows-only header"
Expand All @@ -21,4 +21,4 @@ void use_wch(board_t& tromino_board, std::ostream& os) noexcept;

} // namespace tromino::cli::windows

#endif // CLI_TRMN_GRAPH_WINDOWS_HPP
#endif // CLI_TRMN_GRAPH_WINDOWS_HPP_
6 changes: 3 additions & 3 deletions src/cli/wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef CLI_WRAPPER_HPP
#define CLI_WRAPPER_HPP
#ifndef CLI_WRAPPER_HPP_
#define CLI_WRAPPER_HPP_

template <typename T>
using tromino_cb_t
Expand All @@ -21,4 +21,4 @@ extern "C" void solve_puzzle_cb(
int pos_x, int pos_y, int flip_x, int flip_y, void* state
) noexcept;

#endif // CLI_WRAPPER_HPP
#endif // CLI_WRAPPER_HPP_
6 changes: 3 additions & 3 deletions src/gui/callback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef GUI_CALLBACK_HPP
#define GUI_CALLBACK_HPP
#ifndef GUI_CALLBACK_HPP_
#define GUI_CALLBACK_HPP_

template <typename T>
using tromino_cb_t
Expand All @@ -22,4 +22,4 @@ extern "C" void solve_puzzle_cb(
int pos_x, int pos_y, int flip_x, int flip_y, void* state
) noexcept;

#endif // GUI_CALLBACK_HPP
#endif // GUI_CALLBACK_HPP_
6 changes: 3 additions & 3 deletions src/gui/cli_models.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef GUI_CLI_MODELS_HPP
#define GUI_CLI_MODELS_HPP
#ifndef GUI_CLI_MODELS_HPP_
#define GUI_CLI_MODELS_HPP_

namespace tromino::tromino2d {

Expand All @@ -18,4 +18,4 @@ struct options {

} // namespace tromino::tromino2d

#endif // GUI_CLI_MODELS_HPP
#endif // GUI_CLI_MODELS_HPP_
6 changes: 3 additions & 3 deletions src/gui/cli_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef GUI_CLI_OPTIONS_HPP
#define GUI_CLI_OPTIONS_HPP
#ifndef GUI_CLI_OPTIONS_HPP_
#define GUI_CLI_OPTIONS_HPP_

#include "cli_models.hpp"

Expand All @@ -23,4 +23,4 @@ bool read_options(

} // namespace tromino::tromino2d

#endif // GUI_CLI_OPTIONS_HPP
#endif // GUI_CLI_OPTIONS_HPP_
6 changes: 3 additions & 3 deletions src/gui/init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef GUI_INIT_HPP
#define GUI_INIT_HPP
#ifndef GUI_INIT_HPP_
#define GUI_INIT_HPP_

#include <optional>
#include <string>
Expand All @@ -22,4 +22,4 @@ int init(

} // namespace tromino::tromino2d

#endif // GUI_INIT_HPP
#endif // GUI_INIT_HPP_
6 changes: 3 additions & 3 deletions src/gui/params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// SPDX-License-Identifier: MIT

#ifndef GUI_PARAMS_HPP
#define GUI_PARAMS_HPP
#ifndef GUI_PARAMS_HPP_
#define GUI_PARAMS_HPP_

#include <cstddef>

Expand All @@ -32,4 +32,4 @@ constexpr std::size_t const FORCE_ARG_IDX{4U};

} // namespace tromino::tromino2d::params

#endif // GUI_PARAMS_HPP
#endif // GUI_PARAMS_HPP_
6 changes: 3 additions & 3 deletions src/gui/shared_state.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef GUI_SHARED_STATE_HPP
#define GUI_SHARED_STATE_HPP
#ifndef GUI_SHARED_STATE_HPP_
#define GUI_SHARED_STATE_HPP_

#include <vector>

Expand All @@ -11,4 +11,4 @@ using SharedState = std::vector<tromino::gfx2d::Step>;

} // namespace tromino::tromino2d

#endif // GUI_SHARED_STATE_HPP
#endif // GUI_SHARED_STATE_HPP_
6 changes: 3 additions & 3 deletions src/wasm/litro/litro.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ found in the LICENSE file.

/* SPDX-License-Identifier: MIT */

#ifndef WASM_LITRO_LITRO_H
#define WASM_LITRO_LITRO_H
#ifndef WASM_LITRO_LITRO_H_
#define WASM_LITRO_LITRO_H_

#include <emscripten.h>

Expand All @@ -22,4 +22,4 @@ EMSCRIPTEN_KEEPALIVE void solve(
add_tromino_extern_callback add_tromino_cb
);

#endif /* WASM_LITRO_LITRO_H */
#endif /* WASM_LITRO_LITRO_H_ */
Loading

0 comments on commit 82e3432

Please sign in to comment.