aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSiva Chandran <siva.chandran@realimage.com>2015-04-25 11:54:22 +0530
committerSiva Chandran <siva.chandran@realimage.com>2015-04-25 11:54:22 +0530
commite99cec63a1232487d4e31a469c35f99ea7b572de (patch)
tree302fcc8ffd6122489bc8fc67b13a9e790327824e /include
parentc94fc46a7a7b8a2947e3625edbfd5ee2c4ce9817 (diff)
downloadcrow-e99cec63a1232487d4e31a469c35f99ea7b572de.tar.gz
crow-e99cec63a1232487d4e31a469c35f99ea7b572de.zip
Made parameter_tag related functions to constexpr/static to avoid linker symbol redefinition error when crow header is included in multiple cpp files.
Diffstat (limited to 'include')
-rw-r--r--include/utility.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/utility.h b/include/utility.h
index 9d1e941..ef66ca2 100644
--- a/include/utility.h
+++ b/include/utility.h
@@ -163,7 +163,7 @@ struct parameter_tag<t> \
: sub_value;
};
- bool is_parameter_tag_compatible(uint64_t a, uint64_t b)
+ constexpr bool is_parameter_tag_compatible(uint64_t a, uint64_t b)
{
if (a == 0)
return b == 0;
@@ -178,7 +178,7 @@ struct parameter_tag<t> \
return is_parameter_tag_compatible(a/6, b/6);
}
- unsigned find_closing_tag_runtime(const char* s, unsigned p)
+ constexpr unsigned find_closing_tag_runtime(const char* s, unsigned p)
{
return
s[p] == 0
@@ -187,7 +187,7 @@ struct parameter_tag<t> \
? p : find_closing_tag_runtime(s, p + 1);
}
- uint64_t get_parameter_tag_runtime(const char* s, unsigned p = 0)
+ static inline uint64_t get_parameter_tag_runtime(const char* s, unsigned p = 0)
{
return
s[p] == 0