fix build: Don't use libfmt or ranges in win cpp
I can't deal with this anymore. My build is suddenly broken on Windows (for spark_crypto.prod branch). I assume they updated the compiler in a way that isn't backwards compatible. Thanks Windows.
This commit is contained in:
1 parent
15b1d55ef1
commit
3c97f2552b
3 files changed
+30
-42
No files matched your search
+2
-12
@@ -1,15 +1,11 @@
|
||||
#include "URL.h"
|
||||
#include "lib/api/io/URL.pb.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <range/v3/view.hpp>
|
||||
#include <range/v3/view/transform.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace bts::io {
|
||||
|
||||
// URL:: URL(const api::io::URL &url) : protocol_(url.protocol()),
|
||||
// host_(url.host()), port_(url.port()), path_(url.path()) {}
|
||||
URL::URL(const bts::api::io::URL &url)
|
||||
: protocol_(url.protocol()), host_(url.host()), port_(url.port()),
|
||||
path_(url.path()) {
|
||||
@@ -76,13 +72,7 @@ std::string URL::to_string() const {
|
||||
}
|
||||
if (!query_params_.empty()) {
|
||||
rv.append("?");
|
||||
auto query_param_strs =
|
||||
ranges::transform_view(query_params_, [](const auto &qp) {
|
||||
return qp.first + "=" + qp.second;
|
||||
});
|
||||
rv.append(fmt::format(
|
||||
"{}",
|
||||
fmt::join(query_param_strs.begin(), query_param_strs.end(), "&")));
|
||||
rv.append(query_params_.to_string());
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user