From db1ec847f989a71b2cb1e0c39194e277613931fd Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Wed, 1 Jun 2016 22:03:27 -0700 Subject: fix lint error in wgettext() Cppcheck was complaining about the `return val.c_str()` at the end of the `wgettext()` function. That would normally a bug since the lifetime of `val` ends when the function returns. In this particular case that's not true because the string is interned in a cache. Nonetheless, rather than suppress the lint warning I decided to modify the API to be more idiomatic. In the process of fixing the aforementioned lint warning I fixed several other lint errors in that module. This required making our copy of `wgetopt()` compatible with the rest of the fish code. Specifically, by removing its local definitions of the "_" macro so it uses the same macro used everywhere else in the fish code. The sooner we kill the use of wide chars the better. --- configure.ac | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index dae16589..8f1b95fa 100644 --- a/configure.ac +++ b/configure.ac @@ -237,18 +237,6 @@ LDFLAGS="$prev_LDFLAGS" AC_CHECK_FILES([/proc/self/stat]) - -# -# This is ued to tell the wgetopt library to translate strings. This -# way wgetopt can be dropped into any project without requiring i18n. -# - -AC_DEFINE( - [HAVE_TRANSLATE_H], - [1], - [Define to 1 if the wgettext function should be used for translating strings.] -) - # Disable curses macros that conflict with the STL AC_DEFINE([NCURSES_NOMACROS], [1], [Define to 1 to disable ncurses macros that conflict with the STL]) AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict with the STL]) -- cgit v1.2.3