Correctly cast to int in debug message.

A `class enum` is not implicitly cast to an `int`.
It is better to explicitly cast it to avoid future error with different
versions of compiler.
This commit is contained in:
Matthieu Gautier 2017-12-04 15:12:27 +00:00
parent 9eaf512bf9
commit 5c11ff1a30

View File

@ -129,7 +129,7 @@ int RequestContext::fill_argument(void *__this, enum MHD_ValueKind kind,
void RequestContext::print_debug_info() { void RequestContext::print_debug_info() {
printf("method : %s (%d)\n", method==RequestMethod::GET ? "GET" : printf("method : %s (%d)\n", method==RequestMethod::GET ? "GET" :
method==RequestMethod::POST ? "POST" : method==RequestMethod::POST ? "POST" :
"OTHER", method); "OTHER", (int)method);
printf("version : %s\n", version.c_str()); printf("version : %s\n", version.c_str());
printf("headers :\n"); printf("headers :\n");
for (auto it=headers.begin(); it!=headers.end(); it++) { for (auto it=headers.begin(); it!=headers.end(); it++) {