From 3f8f554076acd64234ff0a5e1de4457d981a744f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 29 Oct 2022 04:00:42 +0300 Subject: [PATCH 41/41] Qt: Replace magic '0' with A_NONE See osdn #45530 Signed-off-by: Marko Lindqvist --- client/gui-qt/citydlg.cpp | 2 +- client/gui-qt/helpdlg.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/gui-qt/citydlg.cpp b/client/gui-qt/citydlg.cpp index 787fdc85b9..9684a65423 100644 --- a/client/gui-qt/citydlg.cpp +++ b/client/gui-qt/citydlg.cpp @@ -3915,7 +3915,7 @@ QString get_tooltip_unit(const struct unit_type *utype, bool ext) if (obsolete) { tech = obsolete->require_advance; obsolete_str = QString(""); - if (tech && tech != advance_by_number(0)) { + if (tech && tech != advance_by_number(A_NONE)) { /* TRANS: this and nearby literal strings are interpreted * as (Qt) HTML */ obsolete_str = obsolete_str + QString(_("Obsoleted by %1 (%2).")) diff --git a/client/gui-qt/helpdlg.cpp b/client/gui-qt/helpdlg.cpp index e43cc116eb..2e22430877 100644 --- a/client/gui-qt/helpdlg.cpp +++ b/client/gui-qt/helpdlg.cpp @@ -919,7 +919,7 @@ void help_widget::set_topic_unit(const help_item *topic, // Tech requirement tech = utype->require_advance; - if (tech && tech != advance_by_number(0)) { + if (tech && tech != advance_by_number(A_NONE)) { QLabel *tb; tb = new QLabel(this); @@ -943,7 +943,7 @@ void help_widget::set_topic_unit(const help_item *topic, obsolete = utype->obsoleted_by; if (obsolete) { tech = obsolete->require_advance; - if (tech && tech != advance_by_number(0)) { + if (tech && tech != advance_by_number(A_NONE)) { QLabel *tb; tb = new QLabel(this); -- 2.35.1