From 13b8a70c519fe60dd6e8749ae88e6d24c5025ae4 Mon Sep 17 00:00:00 2001 From: Jonas Westerlund Date: Thu, 12 Mar 2015 14:53:45 -0700 Subject: Fix parameter typos --- include/routing.h | 12 ++++++------ include/utility.h | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/routing.h b/include/routing.h index efee28b..7def7ca 100644 --- a/include/routing.h +++ b/include/routing.h @@ -303,12 +303,12 @@ namespace crow #else using function_t = utility::function_traits; #endif - if (!black_magic::is_paramter_tag_compatible( + if (!black_magic::is_parameter_tag_compatible( black_magic::get_parameter_tag_runtime(rule_.c_str()), - black_magic::compute_paramater_tag_from_args_list< + black_magic::compute_parameter_tag_from_args_list< typename function_t::template arg...>::value)) { - throw std::runtime_error("route_dynamic: Handler type is mismatched with URL paramters: " + rule_); + throw std::runtime_error("route_dynamic: Handler type is mismatched with URL parameters: " + rule_); } auto ret = detail::routing_handler_call_helper::Wrapped...>(); ret.template set< @@ -353,7 +353,7 @@ namespace crow { static_assert(black_magic::CallHelper>::value || black_magic::CallHelper>::value , - "Handler type is mismatched with URL paramters"); + "Handler type is mismatched with URL parameters"); static_assert(!std::is_same()...))>::value, "Handler function cannot have void return type; valid return types: string, int, crow::resposne, crow::json::wvalue"); @@ -372,7 +372,7 @@ namespace crow { static_assert(black_magic::CallHelper>::value || black_magic::CallHelper>::value, - "Handler type is mismatched with URL paramters"); + "Handler type is mismatched with URL parameters"); static_assert(!std::is_same(), std::declval()...))>::value, "Handler function cannot have void return type; valid return types: string, int, crow::resposne, crow::json::wvalue"); @@ -393,7 +393,7 @@ namespace crow black_magic::CallHelper>::value || black_magic::CallHelper>::value , - "Handler type is mismatched with URL paramters"); + "Handler type is mismatched with URL parameters"); static_assert(std::is_same(), std::declval(), std::declval()...))>::value, "Handler function with response argument should have void return type"); diff --git a/include/utility.h b/include/utility.h index d1dda06..9d1e941 100644 --- a/include/utility.h +++ b/include/utility.h @@ -120,13 +120,13 @@ namespace crow } #endif template - struct paramater_tag + struct parameter_tag { static const int value = 0; }; #define CROW_INTERNAL_PARAMETER_TAG(t, i) \ template <> \ -struct paramater_tag \ +struct parameter_tag \ { \ static const int value = i; \ }; @@ -144,26 +144,26 @@ struct paramater_tag \ CROW_INTERNAL_PARAMETER_TAG(std::string, 4); #undef CROW_INTERNAL_PARAMETER_TAG template - struct compute_paramater_tag_from_args_list; + struct compute_parameter_tag_from_args_list; template <> - struct compute_paramater_tag_from_args_list<> + struct compute_parameter_tag_from_args_list<> { static const int value = 0; }; template - struct compute_paramater_tag_from_args_list + struct compute_parameter_tag_from_args_list { static const int sub_value = - compute_paramater_tag_from_args_list::value; + compute_parameter_tag_from_args_list::value; static const int value = - paramater_tag::type>::value - ? sub_value* 6 + paramater_tag::type>::value + parameter_tag::type>::value + ? sub_value* 6 + parameter_tag::type>::value : sub_value; }; - bool is_paramter_tag_compatible(uint64_t a, uint64_t b) + bool is_parameter_tag_compatible(uint64_t a, uint64_t b) { if (a == 0) return b == 0; @@ -175,7 +175,7 @@ struct paramater_tag \ if (sb == 5) sb = 4; if (sa != sb) return false; - return is_paramter_tag_compatible(a/6, b/6); + return is_parameter_tag_compatible(a/6, b/6); } unsigned find_closing_tag_runtime(const char* s, unsigned p) -- cgit v1.2.3-54-g00ecf