Address compile warnings (Xcode 12) in the editors

This commit is contained in:
2024-08-10 12:58:01 -04:00
parent 84b649a107
commit 30e583b1d4
3 changed files with 20 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ extern fs::path progDir;
short specials_res_id;
char start_name[256];
void process_args(int argc, char* argv[]) {
static void process_args(int argc, char* argv[]) {
if(argc > 1) {
if(load_party(argv[1], univ)) {
file_in_mem = argv[1];
@@ -563,7 +563,16 @@ void pick_preferences() {
prefsDlog.run();
// Suppress the float comparison warning.
// We know it's safe here - we're just comparing static values.
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
if(get_float_pref("UIScale") != ui_scale)
changed_display_mode = true;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}

View File

@@ -2511,8 +2511,6 @@ extern size_t num_strs(short mode); // defined in scen.keydlgs.cpp
// mode 0 - scen 1 - out 2 - town 3 - journal
// if just_redo_text not 0, simply need to update text portions
void start_string_editing(eStrMode mode,short just_redo_text) {
long pos;
if(just_redo_text == 0) {
if(overall_mode < MODE_MAIN_SCREEN)
set_up_main_screen();

View File

@@ -187,7 +187,7 @@ void adjust_windows (sf::RenderWindow & mainPtr, sf::View & mainView) {
adjust_window_for_menubar(5, width, height);
}
void process_args(int argc, char* argv[]) {
static void process_args(int argc, char* argv[]) {
if(argc > 1) {
if(load_scenario(argv[1], scenario)) {
set_current_town(scenario.last_town_edited);
@@ -726,8 +726,17 @@ void pick_preferences() {
prefsDlog.run();
// Suppress the float comparison warning.
// We know it's safe here - we're just comparing static values.
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
if(get_float_pref("UIScale") != ui_scale)
changed_display_mode = true;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}
void Mouse_Pressed(const sf::Event & event) {