From 598dba9d17838e92f89bcd3ec78c69cc4ce50044 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 6 Feb 2008 21:49:14 +0000 Subject: minor cleanups --- src/core/application.cc | 10 +++++----- src/core/cvar.cc | 3 +-- src/core/func.cc | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/application.cc b/src/core/application.cc index a5d2937..e444b14 100644 --- a/src/core/application.cc +++ b/src/core/application.cc @@ -15,7 +15,7 @@ namespace core { -// --------------- function repository ------------------------------ +// --------------- engine functions ------------------------------ extern "C" void func_print(std::stringstream &args) { char text[MAXCMDSIZE]; @@ -52,12 +52,12 @@ extern "C" void func_disconnect(std::stringstream &args) Application::instance()->disconnect(); } -extern "C" void func_listfunc(std::stringstream &args) +extern "C" void func_list_func(std::stringstream &args) { func::list(); } -extern "C" void func_listcvar(std::stringstream &args) +extern "C" void func_list_var(std::stringstream &args) { cvar::list(); } @@ -131,8 +131,8 @@ void Application::init() func::add("connect", func_connect); func::add("disconnect", func_disconnect); - func::add("listcvar", func_listcvar); - func::add("listfunc", func_listfunc); + func::add("list_var", func_list_var); + func::add("list_func", func_list_func); if (game()) game()->connected = false; diff --git a/src/core/cvar.cc b/src/core/cvar.cc index f7402ab..ce31a49 100644 --- a/src/core/cvar.cc +++ b/src/core/cvar.cc @@ -156,12 +156,11 @@ Cvar find(const char *name) void list() { - con_print << "Registered variables:" << std::endl; - std::map::iterator it; for (it = registry.begin(); it != registry.end(); it++) { con_print << " "<< (*it).first << " " << (*it).second->text() << std::endl; } + con_print << registry.size() << " registered variables." << std::endl; } } // namespace cvar diff --git a/src/core/func.cc b/src/core/func.cc index 064f77d..02e7f7d 100644 --- a/src/core/func.cc +++ b/src/core/func.cc @@ -43,11 +43,11 @@ Func find(const std::string &functionname) void list() { - con_print << "Registered functions:" << std::endl; std::map::iterator it; for (it = registry.begin(); it != registry.end(); it++) { con_print << " " << (*it).first << std::endl; } + con_print << registry.size() << " registered functions." << std::endl; } } // namespace func -- cgit v1.2.3