summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-02-03 14:42:41 -0500
committerDavid Robillard <d@drobilla.net>2023-02-03 18:29:18 -0500
commitbeb23867f8cfd5bc0c58b8044de3433b40c2b3e5 (patch)
treeadd1e01060290920fb24d4c80acfa1875c0ae86e /src/main.cpp
parente9f7b26d8f47ba5911c2c271fd2cccdffc30a831 (diff)
downloadpatchage-beb23867f8cfd5bc0c58b8044de3433b40c2b3e5.tar.gz
patchage-beb23867f8cfd5bc0c58b8044de3433b40c2b3e5.tar.bz2
patchage-beb23867f8cfd5bc0c58b8044de3433b40c2b3e5.zip
Suppress/fix new warnings in clang-tidy 15
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 568ebca..6d09fe4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -23,7 +23,8 @@
#if USE_GETTEXT
# include <libintl.h>
-# include <locale.h>
+
+# include <clocale>
#endif
#include <cstring>
@@ -100,7 +101,10 @@ main(int argc, char** argv)
#endif
#if USE_GETTEXT
- setlocale(LC_ALL, "");
+ if (!setlocale(LC_ALL, "")) {
+ std::cerr << "patchage: failed to set locale\n";
+ }
+
bindtextdomain("patchage", PATCHAGE_LOCALE_DIR);
bind_textdomain_codeset("patchage", "UTF-8");
textdomain("patchage");
@@ -109,7 +113,7 @@ main(int argc, char** argv)
try {
Glib::thread_init();
- Gtk::Main app(argc, argv);
+ const Gtk::Main app(argc, argv);
++argv;
--argc;