Follow-up Comment #1, patch #1036 (project wesnoth):

Overall looks great to me. Here are some style comments:

+       //A function object class with only the cosntructor public.

-- spelling of 'constructor'.

-- the get_flags() function looks unnecessarily complicated? Why not just do
this:

std::string get_flags() const
{
    std::string flags;
    if(debug_only) {
        flags += "D";
    }
    if(network_only) {
        flags += "N";
    }

    return flags;
}

+                       static void assert_existance(const std::string& cmd)

-- correct spelling is 'existence'.

+                               assert(command_map_.find(cmd) != 
command_map_.end());

-- how about assert(command_map_.count(cmd)); ?

+       const std::list<std::string> console_handler::get_aliases(

-- is there any reason to use a list instead of a vector? (list is very
rarely a good choice -- it probably makes little difference but we generally
prefer to use vector everywhere).

+//             if (network::nconnections() != 0) {

-- what's up with the commented-out code?

+                       side_num = lexical_cast<unsigned int, 
std::string>(side);

You don't need to specify that std::string is the source type for the cast;
it is implied.

--David

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1036>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to