Changed to use const std::string & as much as possible instead of const char * (#1331)

* Changed to use `const std::string &` as much as possible instead of `const char *`

* Fix problems on Windows
This commit is contained in:
yhirose 2022-07-22 22:44:33 -04:00 committed by GitHub
parent 6dc285b5ca
commit f0eb55b327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 607 additions and 549 deletions

1154
httplib.h

File diff suppressed because it is too large Load diff

View file

@ -4180,7 +4180,7 @@ protected:
res.set_content("Hello World!", "text/plain");
});
t_ = thread([&]() { ASSERT_TRUE(svr_.listen(nullptr, PORT, AI_PASSIVE)); });
t_ = thread([&]() { ASSERT_TRUE(svr_.listen(std::string(), PORT, AI_PASSIVE)); });
while (!svr_.is_running()) {
std::this_thread::sleep_for(std::chrono::milliseconds(1));