Eliminate stdostream (finally, that was awful.)

This commit is contained in:
2025-12-15 22:42:02 -05:00
parent f528ba69fe
commit 9dc974ebca
6 changed files with 46 additions and 51 deletions

View File

@@ -135,15 +135,15 @@ public:
}
virtual void do_syntax_error(std::string_view error) override {
stdostream() << "Syntax error: " << error << std::endl;
util::dprint("Syntax error: ", error, "\n");
}
virtual void do_unknown_command(std::string_view name) override {
stdostream() << "Unknown command: " << name << std::endl;
util::dprint("Unknown command: ", name);
}
virtual void do_view_command() override {
stdostream() << world_->tangibles_near_debug_string(actor_id_, 1000);
util::dprint(world_->tangibles_near_debug_string(actor_id_, 1000));
}
virtual void do_moveto_command(int x, int y) override {
@@ -181,7 +181,7 @@ public:
virtual void do_luaprobe_command(std::string_view cmd) override {
world_to_asynchronous();
stdostream() << world_->probe_lua_expr(actor_id_, cmd);
util::dprint(world_->probe_lua_expr(actor_id_, cmd));
world_to_synchronous();
}
@@ -210,7 +210,7 @@ public:
DebugCollector dbc("");
int64_t nactor = world_->patch(sb, &dbc);
if (nactor != actor_id_) change_actor_id(nactor);
dbc.dump(stdostream());
// dbc.dump(...);
} catch (const StreamException &sexcept) {
abandon_server();
return;
@@ -271,6 +271,7 @@ public:
break;
}
case AccessKind::CHANNEL_PRINTS: {
// If there's nothing new in the printbuffer, this is very fast.
world_to_asynchronous();
if (print_channeler_.channel(world_->get_printbuffer(actor_id_), retpk)) {
send_invocation(print_channeler_.invocation(actor_id_));