From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:30:42 +0000 (-0600) Subject: hide inifile_t from users (#1085) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~1^2~74 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=75d1f3cb1635301e715438da91ad9b690d49a670;p=gpsbabel.git hide inifile_t from users (#1085) * hide inifile_t from users. * explicitly make vars have internal linkage although since c++11 all vars declared in unnamed namespaces will anyway. --- diff --git a/inifile.cc b/inifile.cc index cb0279071..3daa49c8d 100644 --- a/inifile.cc +++ b/inifile.cc @@ -34,6 +34,11 @@ #define MYNAME "inifile" +struct inifile_t { + QHash sections; + QString source; +}; + class InifileSection { public: @@ -46,8 +51,8 @@ public: /* internal procedures */ -#define GPSBABEL_INIFILE "gpsbabel.ini" -#define GPSBABEL_SUBDIR ".gpsbabel" +static constexpr char GPSBABEL_INIFILE[] = "gpsbabel.ini"; +static constexpr char GPSBABEL_SUBDIR[] = ".gpsbabel"; static QString diff --git a/inifile.h b/inifile.h index ef42c0876..4444ee184 100644 --- a/inifile.h +++ b/inifile.h @@ -25,10 +25,7 @@ #include // for QString class InifileSection; -struct inifile_t { - QHash sections; - QString source; -}; +struct inifile_t; // forward declare, opaque to users. /* inifile_init: