Skip to content

Commit

Permalink
clang fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
schombert committed Sep 22, 2024
1 parent 479438f commit cc5ffbf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ if(WIN32)
if(OPTIMIZE_MODE STREQUAL "On")
message(STATUS "Optimizing with PGO data")
target_compile_options(AliceCommon INTERFACE
/bigobj /wd4100 /wd4189 /wd4065 /wd4201 /wd4324 /GR- /W4 /permissive- /WX /arch:AVX2 /GF /w34388 /w34389 -Wno-unused-macros -Wno-zero-length-array -Wno-switch-default -Wno-reserved-identifier -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field /Z7 -Wno-invalid-offsetof -Wno-deprecated-volatile -Wno-missing-prototypes -Wno-reserved-identifier -Wno-implicit-int-float-conversion -Wno-unsafe-buffer-usage -Wno-float-equal -Wno-shadow-field-in-constructor -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-double-promotion -Wno-shadow-uncaptured-local -Wno-nonportable-system-include-path -Wno-format-nonliteral -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-implicit-int-conversion -Wno-disabled-macro-expansion -Wno-comma -Wno-cast-function-type-strict -Wno-cast-function-type -Wno-invalid-offsetof -Wno-microsoft-cast /DNDEBUG /wd4530 /MT /O2 /Oi /sdl- /GS- /Gy /Gw /Zc:inline -Wno-profile-instr-missing -Wno-profile-instr-out-of-date -fprofile-instr-use=code.profdata)
/bigobj /wd4100 /wd4189 /wd4065 /wd4201 /wd4324 /GR- /W4 /permissive- /WX /arch:AVX2 /GF /w34388 /w34389 -Wno-unused-macros -Wno-zero-length-array -Wno-switch-default -Wno-reserved-identifier -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field /Z7 -Wno-invalid-offsetof -Wno-deprecated-volatile -Wno-missing-prototypes -Wno-reserved-identifier -Wno-implicit-int-float-conversion -Wno-unsafe-buffer-usage -Wno-float-equal -Wno-shadow-field-in-constructor -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-double-promotion -Wno-shadow-uncaptured-local -Wno-nonportable-system-include-path -Wno-format-nonliteral -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-implicit-int-conversion -Wno-disabled-macro-expansion -Wno-comma -Wno-cast-function-type-strict -Wno-cast-function-type -Wno-invalid-offsetof -Wno-microsoft-cast -Wno-reserved-identifier /DNDEBUG /wd4530 /MT /O2 /Oi /sdl- /GS- /Gy /Gw /Zc:inline -Wno-profile-instr-missing -Wno-profile-instr-out-of-date -fprofile-instr-use=code.profdata)
target_link_options(AliceCommon INTERFACE /OPT:REF /OPT:ICF /LTCG -fprofile-instr-use=code.profdata)
elseif(PROFILE_MODE STREQUAL "On")
message(STATUS "Compiling for PGO instrumentation")
target_compile_options(AliceCommon INTERFACE
/bigobj /wd4100 /wd4189 /wd4065 /wd4201 /wd4324 /GR- /W4 /permissive- /WX /arch:AVX2 /GF /w34388 /w34389 -Wno-unused-macros -Wno-zero-length-array -Wno-switch-default -Wno-reserved-identifier -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field /Z7 -Wno-invalid-offsetof -Wno-deprecated-volatile -Wno-missing-prototypes -Wno-reserved-identifier -Wno-implicit-int-float-conversion -Wno-unsafe-buffer-usage -Wno-float-equal -Wno-shadow-field-in-constructor -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-double-promotion -Wno-shadow-uncaptured-local -Wno-nonportable-system-include-path -Wno-format-nonliteral -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-implicit-int-conversion -Wno-disabled-macro-expansion -Wno-comma -Wno-cast-function-type-strict -Wno-cast-function-type -Wno-invalid-offsetof -Wno-microsoft-cast /DNDEBUG /wd4530 /MT /O2 /Oi /sdl- /GS- /Gy /Gw /Zc:inline -fprofile-instr-generate)
/bigobj /wd4100 /wd4189 /wd4065 /wd4201 /wd4324 /GR- /W4 /permissive- /WX /arch:AVX2 /GF /w34388 /w34389 -Wno-unused-macros -Wno-zero-length-array -Wno-switch-default -Wno-reserved-identifier -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field /Z7 -Wno-invalid-offsetof -Wno-deprecated-volatile -Wno-missing-prototypes -Wno-reserved-identifier -Wno-implicit-int-float-conversion -Wno-unsafe-buffer-usage -Wno-float-equal -Wno-shadow-field-in-constructor -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-double-promotion -Wno-shadow-uncaptured-local -Wno-nonportable-system-include-path -Wno-format-nonliteral -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-implicit-int-conversion -Wno-disabled-macro-expansion -Wno-comma -Wno-cast-function-type-strict -Wno-cast-function-type -Wno-invalid-offsetof -Wno-microsoft-cast -Wno-reserved-identifier /DNDEBUG /wd4530 /MT /O2 /Oi /sdl- /GS- /Gy /Gw /Zc:inline -fprofile-instr-generate)
target_link_options(AliceCommon INTERFACE /DEBUG:FULL /OPT:REF /OPT:ICF /LTCG -fprofile-instr-generate)
else()
target_compile_options(AliceCommon INTERFACE
/bigobj /wd4100 /wd4189 /wd4065 /wd4201 /wd4324 /GR- /W4 /permissive- /WX /GF /w34388 /w34389 -Wno-unused-macros -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field /Z7 -Wno-invalid-offsetof -Wno-deprecated-volatile -Wno-missing-prototypes -Wno-reserved-identifier -Wno-implicit-int-float-conversion -Wno-unsafe-buffer-usage -Wno-float-equal -Wno-shadow-field-in-constructor -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-double-promotion -Wno-shadow-uncaptured-local -Wno-nonportable-system-include-path -Wno-format-nonliteral -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-implicit-int-conversion -Wno-disabled-macro-expansion -Wno-comma -Wno-cast-function-type-strict -Wno-cast-function-type -Wno-invalid-offsetof -Wno-switch-default -Wno-zero-length-array -Wno-microsoft-cast /arch:AVX2
/bigobj /wd4100 /wd4189 /wd4065 /wd4201 /wd4324 /GR- /W4 /permissive- /WX /GF /w34388 /w34389 -Wno-unused-macros -Wno-unused-parameter -Wno-unused-variable -Wno-unused-private-field /Z7 -Wno-invalid-offsetof -Wno-deprecated-volatile -Wno-missing-prototypes -Wno-reserved-identifier -Wno-implicit-int-float-conversion -Wno-unsafe-buffer-usage -Wno-float-equal -Wno-shadow-field-in-constructor -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-double-promotion -Wno-shadow-uncaptured-local -Wno-nonportable-system-include-path -Wno-format-nonliteral -Wno-shorten-64-to-32 -Wno-ctad-maybe-unsupported -Wno-implicit-int-conversion -Wno-disabled-macro-expansion -Wno-comma -Wno-cast-function-type-strict -Wno-cast-function-type -Wno-invalid-offsetof -Wno-switch-default -Wno-zero-length-array -Wno-microsoft-cast -Wno-reserved-identifier /arch:AVX2
$<$<CONFIG:Debug>: /RTC1 /EHsc /MTd /Od>
$<$<NOT:$<CONFIG:Debug>>: /DNDEBUG /wd4530 /MT /O2 /Oi /sdl- /GS- /Gy /Gw /Zc:inline>)
target_link_options(AliceCommon INTERFACE
Expand Down
6 changes: 3 additions & 3 deletions dependencies/glew/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(FetchContent)
FetchContent_Declare(
glew
GIT_REPOSITORY https://github.com/Perlmint/glew-cmake.git
GIT_TAG f456dea
GIT_TAG 72ff6b1
GIT_SHALLOW 1
GIT_PROGRESS TRUE
)
Expand All @@ -28,13 +28,13 @@ if(WIN32)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_target_properties(libglew_static PROPERTIES COMPILE_FLAGS "/MTd /wd4100 /wd4189 /wd4065 /GR- /W3 /permissive- /GF /w34388 /w34389 /RTC1 /EHsc /Od /RTC1")
set_target_properties(libglew_static PROPERTIES COMPILE_FLAGS "/MTd /wd4100 /wd4189 /wd4065 /GR- /W3 /permissive- /GF /w34388 /w34389 /RTC1 /EHsc /Od /RTC1 -Wno-reserved-identifier -Wno-nonportable-system-include-path -Wno-unsafe-buffer-usage -Wno-strict-prototypes")
else()
set_target_properties(libglew_static PROPERTIES COMPILE_FLAGS "/MTd /wd4100 /wd4189 /wd4065 /GR- /W3 /permissive- /Zc:preprocessor /GF /w34388 /w34389 /RTC1 /EHsc /Od /RTC1")
endif()
else()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_target_properties(libglew_static PROPERTIES COMPILE_FLAGS "/MT /wd4100 /wd4189 /wd4065 /GR- /W3 /permissive- /GF /w34388 /w34389 /wd4530 /O2 /Oi /sdl- /GS- /Gy /Gw /Zc:inline")
set_target_properties(libglew_static PROPERTIES COMPILE_FLAGS "/MT /wd4100 /wd4189 /wd4065 /GR- /W3 /permissive- /GF /w34388 /w34389 /wd4530 /O2 /Oi /sdl- /GS- /Gy /Gw /Zc:inline -Wno-reserved-identifier -Wno-nonportable-system-include-path -Wno-unsafe-buffer-usage -Wno-strict-prototypes")
else()
set_target_properties(libglew_static PROPERTIES COMPILE_FLAGS "/MT /wd4100 /wd4189 /wd4065 /GR- /W3 /permissive- /Zc:preprocessor /GF /w34388 /w34389 /wd4530 /O2 /Oi /GL /sdl- /GS- /Gy /Gw /Zc:inline")
endif()
Expand Down
42 changes: 21 additions & 21 deletions src/gui/topbar_subwindows/gui_trade_window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,51 +1271,51 @@ bool compare_stockpile_player(sys::state& state, element_base* container, dcon::
return value_a < value_b;
}

table::column<dcon::commodity_id> trade_good_name_column = {
inline table::column<dcon::commodity_id> trade_good_name_column = {
.sortable = true,
.header = "trade_good_name_header",
.compare = compare_name,
.view = name_view_commodity_id,
.cell_definition_string = "thin_cell_name",
.header_definition_string = "thin_cell_name"
};
table::column<dcon::commodity_id> trade_good_price_column = {
inline table::column<dcon::commodity_id> trade_good_price_column = {
.sortable = true,
.header = "price",
.compare = compare_price,
.view = price_view_commodity_id,
.cell_definition_string = "thin_cell_number"
};

table::column<dcon::commodity_id> trade_good_supply_column = {
inline table::column<dcon::commodity_id> trade_good_supply_column = {
.sortable = true,
.header = "supply",
.compare = compare_supply,
.view = supply_view_commodity_id,
.cell_definition_string = "thin_cell_number"
};
table::column<dcon::commodity_id> trade_good_demand_column = {
inline table::column<dcon::commodity_id> trade_good_demand_column = {
.sortable = true,
.header = "demand",
.compare = compare_demand,
.view = demand_view_commodity_id,
.cell_definition_string = "thin_cell_number"
};
table::column<dcon::commodity_id> trade_good_balance_column = {
inline table::column<dcon::commodity_id> trade_good_balance_column = {
.sortable = true,
.header = "balance",
.compare = compare_balance,
.view = balance_view_commodity_id,
.cell_definition_string = "thin_cell_number"
};
table::column<dcon::commodity_id> trade_good_market_stockpile_column = {
inline table::column<dcon::commodity_id> trade_good_market_stockpile_column = {
.sortable = true,
.header = "market_stockpiles",
.compare = compare_stockpile_market,
.view = stockpile_market_view_commodity_id,
.cell_definition_string = "thin_cell_number"
};
table::column<dcon::commodity_id> trade_good_player_stockpile_column = {
inline table::column<dcon::commodity_id> trade_good_player_stockpile_column = {
.sortable = true,
.header = "national_stockpile",
.compare = compare_stockpile_player,
Expand All @@ -1324,7 +1324,7 @@ table::column<dcon::commodity_id> trade_good_player_stockpile_column = {
};


table::column<dcon::commodity_id> trade_good_player_gov_needs = {
inline table::column<dcon::commodity_id> trade_good_player_gov_needs = {
.sortable = true,
.header = "government_need",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1341,7 +1341,7 @@ table::column<dcon::commodity_id> trade_good_player_gov_needs = {
}
};

table::column<dcon::commodity_id> trade_good_player_factory_needs = {
inline table::column<dcon::commodity_id> trade_good_player_factory_needs = {
.sortable = true,
.header = "factory_need",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1358,7 +1358,7 @@ table::column<dcon::commodity_id> trade_good_player_factory_needs = {
}
};

table::column<dcon::commodity_id> trade_good_player_pop_needs = {
inline table::column<dcon::commodity_id> trade_good_player_pop_needs = {
.sortable = true,
.header = "pop_need",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1375,7 +1375,7 @@ table::column<dcon::commodity_id> trade_good_player_pop_needs = {
}
};

table::column<dcon::commodity_id> trade_good_production_rgo = {
inline table::column<dcon::commodity_id> trade_good_production_rgo = {
.sortable = true,
.header = "rgo_production",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand Down Expand Up @@ -1407,7 +1407,7 @@ table::column<dcon::commodity_id> trade_good_production_rgo = {
}
};

table::column<dcon::commodity_id> trade_good_production_artisan = {
inline table::column<dcon::commodity_id> trade_good_production_artisan = {
.sortable = true,
.header = "artisan_production",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1433,7 +1433,7 @@ table::column<dcon::commodity_id> trade_good_production_artisan = {
}
};

table::column<dcon::commodity_id> trade_good_production_factory = {
inline table::column<dcon::commodity_id> trade_good_production_factory = {
.sortable = true,
.header = "factory_production",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand Down Expand Up @@ -1462,7 +1462,7 @@ table::column<dcon::commodity_id> trade_good_production_factory = {
}
};

table::column<dcon::commodity_id> trade_good_artisan_distribution = {
inline table::column<dcon::commodity_id> trade_good_artisan_distribution = {
.sortable = true,
.header = "artisan_distribution",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1479,7 +1479,7 @@ table::column<dcon::commodity_id> trade_good_artisan_distribution = {
}
};

table::column<dcon::commodity_id> trade_good_satisfaction = {
inline table::column<dcon::commodity_id> trade_good_satisfaction = {
.sortable = true,
.header = "artisan_distribution",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1496,7 +1496,7 @@ table::column<dcon::commodity_id> trade_good_satisfaction = {
}
};

table::column<dcon::commodity_id> trade_good_produced_nation = {
inline table::column<dcon::commodity_id> trade_good_produced_nation = {
.sortable = true,
.header = "produced_nation",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1513,7 +1513,7 @@ table::column<dcon::commodity_id> trade_good_produced_nation = {
}
};

table::column<dcon::commodity_id> trade_good_consumed_nation = {
inline table::column<dcon::commodity_id> trade_good_consumed_nation = {
.sortable = true,
.header = "consumed_nation",
.compare = [](sys::state& state, element_base* container, dcon::commodity_id a, dcon::commodity_id b) {
Expand All @@ -1533,7 +1533,7 @@ table::column<dcon::commodity_id> trade_good_consumed_nation = {
}
};

table::column<dcon::nation_id> nation_name = {
inline table::column<dcon::nation_id> nation_name = {
.sortable = true,
.header = "nation_name",
.compare = [](sys::state& state, element_base* container, dcon::nation_id a, dcon::nation_id b) {
Expand All @@ -1552,7 +1552,7 @@ table::column<dcon::nation_id> nation_name = {
.header_definition_string = "thin_cell_name"
};

table::column<dcon::nation_id> nation_production = {
inline table::column<dcon::nation_id> nation_production = {
.sortable = true,
.header = "produced_nation",
.compare = [](sys::state& state, element_base* container, dcon::nation_id a, dcon::nation_id b) {
Expand All @@ -1571,7 +1571,7 @@ table::column<dcon::nation_id> nation_production = {
}
};

table::column<dcon::nation_id> nation_demand = {
inline table::column<dcon::nation_id> nation_demand = {
.sortable = true,
.header = "demanded_nation",
.compare = [](sys::state& state, element_base* container, dcon::nation_id a, dcon::nation_id b) {
Expand All @@ -1590,7 +1590,7 @@ table::column<dcon::nation_id> nation_demand = {
}
};

table::column<dcon::nation_id> nation_consumption = {
inline table::column<dcon::nation_id> nation_consumption = {
.sortable = true,
.header = "consumed_nation",
.compare = [](sys::state& state, element_base* container, dcon::nation_id a, dcon::nation_id b) {
Expand Down

0 comments on commit cc5ffbf

Please sign in to comment.