aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-10 09:43:40 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-11 12:43:52 +0800
commite47ad09130e20000616450da7db90de595ad4fc7 (patch)
treeaebaf747aa5b39c7ee6e5f1e2736b1fcbf88d782 /common.h
parent689d0082d829e26ff3c58307687e801cc5a98656 (diff)
Make `contains` take the string by const reference again, for performance reasons
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/common.h b/common.h
index e5573fa7..b0646e4d 100644
--- a/common.h
+++ b/common.h
@@ -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