aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/wgetopt.cpp
Commit message (Collapse)AuthorAge
* fix lint error in wgettext()Gravatar Kurtis Rader2016-06-01
| | | | | | | | | | | | | | | | 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.
* fix some style bogosities that crept inGravatar Kurtis Rader2016-05-27
|
* restyle switch blocks to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | | | | | | | | | | I missed restyling a few "switch" blocks to make them consistent with the rest of the code base. This fixes that oversight. This should be the final step in restyling the C++ code to have a consistent style. This also includes a few trivial cleanups elsewhere. I also missed restyling the "complete" module when working my way from a to z so this final change includes restyling that module. Total lint errors decreased 36%. Cppcheck errors went from 47 to 24. Oclint P2 errors went from 819 to 778. Oclint P3 errors went from 3252 to 1842. Resolves #2902.
* restyle remaining modules to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | | | | For this change I decided to bundle the remaining modules that need to be resytyled because only two were large enough to warrant doing on their own. Reduces lint errors from 225 to 162 (-28%). Line count from 3073 to 2465 (-20%). Another step in resolving issue #2902.
* add better support for IWYU and fix thingsGravatar Kurtis Rader2016-04-26
| | | | | | | | | Remove the "make iwyu" build target. Move the functionality into the recently introduced lint.fish script. Fix a lot, but not all, of the include-what-you-use errors. Specifically, it fixes all of the IWYU errors on my OS X server but only removes some of them on my Ubuntu 14.04 server. Fixes #2957
* fixes for cppcheck lint warningsGravatar Kurtis Rader2016-04-04
| | | | | | Refine the linting behavior. Fix several of the, mostly trivial, lint errors.
* remove unused wgetopt() method found by lintingGravatar Kurtis Rader2016-04-02
|
* Remove some unnecessary statics and a silly #define constGravatar ridiculousfish2016-02-27
|
* Remove an unnecessary typecastGravatar ridiculousfish2016-02-10
|
* Remove a stale comment about constGravatar ridiculousfish2016-02-10
|
* Remove const from _wgetopt_internal's argv argumentGravatar Jon Eyolfson2016-02-10
| | | | The argv argument may be modified on calls to exchange within the function and should not be const qualified (it's not true from the caller's point of view).
* Merge branch 'master' into iwyuGravatar David Adam2015-07-26
|
* Eliminate wgetopt global variablesGravatar ridiculousfish2015-07-25
| | | | | Replace them with a new struct wgetopter_t that uses instance variables instead.
* Migrate source files into src/ directoryGravatar ridiculousfish2015-07-24
This change moves source files into a src/ directory, and puts object files into an obj/ directory. The Makefile and xcode project are updated accordingly. Fixes #1866