eliminate using namespace
This commit is contained in:
+4
-6
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user