Commit 3285c910 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

off by one on mhd MHD_Result change: it came in 0.9.71...

parent 5227e0f0
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <microhttpd.h> #include <microhttpd.h>
#if MHD_VERSION < 0x00097000 #if MHD_VERSION <= 0x00097000
#define MHD_Result int #define MHD_Result int
#endif #endif
......
...@@ -1404,8 +1404,11 @@ unsigned int stringToFlags(const vector<CharFlags>& flags, ...@@ -1404,8 +1404,11 @@ unsigned int stringToFlags(const vector<CharFlags>& flags,
stringToTokens(input, toks, sep); stringToTokens(input, toks, sep);
for (auto& tok: toks) { for (auto& tok: toks) {
trimstring(tok); trimstring(tok);
out += std::accumulate(flags.begin(), flags.end(), out, out = std::accumulate(
[&](int o, CharFlags flag){ return tok == flag.yesname ? o | flag.value : o; }); flags.begin(), flags.end(), out,
[&](unsigned int o, CharFlags flag) {
return tok == flag.yesname ? o | flag.value : o;
});
} }
return out; return out;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment