diff options
author | 2014-03-10 09:43:40 +0800 | |
---|---|---|
committer | 2014-03-11 12:43:52 +0800 | |
commit | e47ad09130e20000616450da7db90de595ad4fc7 (patch) | |
tree | aebaf747aa5b39c7ee6e5f1e2736b1fcbf88d782 /common.h | |
parent | 689d0082d829e26ff3c58307687e801cc5a98656 (diff) |
Make `contains` take the string by const reference again, for performance reasons
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -228,7 +228,7 @@ extern const wchar_t *program_name; /** Check if the specified string element is a part of the specified string list */ -#define contains( str,... ) contains_internal( str, __VA_ARGS__, NULL ) +#define contains( str, ... ) contains_internal( str, 0, __VA_ARGS__, NULL ) /** Print a stack trace to stderr @@ -688,8 +688,8 @@ wcstring wsetlocale(int category, const wchar_t *locale); \return zero if needle is not found, of if needle is null, non-zero otherwise */ -__sentinel bool contains_internal(const wchar_t *needle, ...); -__sentinel bool contains_internal(const wcstring needle, ...); +__sentinel bool contains_internal(const wchar_t *needle, int vararg_handle, ...); +__sentinel bool contains_internal(const wcstring &needle, int vararg_handle, ...); /** Call read while blocking the SIGCHLD signal. Should only be called |