diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-06 21:49:14 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-06 21:49:14 +0000 |
commit | 598dba9d17838e92f89bcd3ec78c69cc4ce50044 (patch) | |
tree | 08a818d6f4dc6a605baa8ddced6165b7bc72ba1f /src/core | |
parent | 884667848ecf043dd2d8c5421250c88931151bd1 (diff) |
minor cleanups
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/application.cc | 10 | ||||
-rw-r--r-- | src/core/cvar.cc | 3 | ||||
-rw-r--r-- | src/core/func.cc | 2 |
3 files changed, 7 insertions, 8 deletions
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<std::string, Cvar>::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<std::string, Func>::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 |