diff options
Diffstat (limited to 'src/zenhttp')
| -rw-r--r-- | src/zenhttp/httpclientauth.cpp | 2 | ||||
| -rw-r--r-- | src/zenhttp/include/zenhttp/httpclient.h | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/zenhttp/httpclientauth.cpp b/src/zenhttp/httpclientauth.cpp index 8754c57d6..72df12d02 100644 --- a/src/zenhttp/httpclientauth.cpp +++ b/src/zenhttp/httpclientauth.cpp @@ -133,8 +133,6 @@ namespace zen { namespace httpclientauth { int ExitCode = Proc.WaitExitCode(); - auto EndTime = std::chrono::system_clock::now(); - if (ExitCode == 0) { IoBuffer Body = IoBufferBuilder::MakeFromFile(AuthTokenPath); diff --git a/src/zenhttp/include/zenhttp/httpclient.h b/src/zenhttp/include/zenhttp/httpclient.h index b12bdefb8..4fec1ec3f 100644 --- a/src/zenhttp/include/zenhttp/httpclient.h +++ b/src/zenhttp/include/zenhttp/httpclient.h @@ -144,8 +144,20 @@ public: : Entries({{{std::string(Entry.first), std::string(Entry.second)}}}) { } - KeyValueMap(std::span<std::pair<std::string_view, std::string_view>>&& List) : Entries(List.begin(), List.end()) {} - KeyValueMap(std::initializer_list<std::pair<std::string_view, std::string_view>>&& List) : Entries(List.begin(), List.end()) {} + KeyValueMap(std::span<std::pair<std::string_view, std::string_view>>&& List) + { + for (const auto& kv : List) + { + Entries.emplace(std::string(kv.first), std::string(kv.second)); + } + } + KeyValueMap(std::initializer_list<std::pair<std::string_view, std::string_view>>&& List) + { + for (const auto& kv : List) + { + Entries.emplace(std::string(kv.first), std::string(kv.second)); + } + } }; struct Response |