eliminate using namespace

This commit is contained in:
Martin Michelsen
2026-05-25 16:38:31 -07:00
parent 4503d09c77
commit e9c2ac34a3
98 changed files with 6022 additions and 6531 deletions
+4 -6
View File
@@ -13,9 +13,7 @@
#include "ShellCommands.hh"
#include "StaticGameData.hh"
using namespace std;
ServerShell::ServerShell(shared_ptr<ServerState> state)
ServerShell::ServerShell(std::shared_ptr<ServerState> state)
: state(state), th(&ServerShell::thread_fn, this) {}
ServerShell::~ServerShell() {
@@ -28,7 +26,7 @@ void ServerShell::thread_fn() {
for (;;) {
phosg::fwrite_fmt(stdout, "newserv> ");
fflush(stdout);
string command;
std::string command;
uint64_t read_start_usecs = phosg::now();
try {
command = phosg::fgets(stdin);
@@ -53,7 +51,7 @@ void ServerShell::thread_fn() {
phosg::strip_leading_whitespace(command);
try {
std::promise<deque<string>> promise;
std::promise<std::deque<std::string>> promise;
auto future = promise.get_future();
asio::co_spawn(
@@ -73,7 +71,7 @@ void ServerShell::thread_fn() {
} catch (const exit_shell&) {
this->state->io_context->stop();
return;
} catch (const exception& e) {
} catch (const std::exception& e) {
phosg::fwrite_fmt(stderr, "FAILED: {}\n", e.what());
}
}