Author: mordante
Date: Sat Nov  1 17:57:46 2008
New Revision: 30503

URL: http://svn.gna.org/viewcvs/wesnoth?rev=30503&view=rev
Log:
Drop trailing underscore from public members.

Modified:
    trunk/src/formula.cpp
    trunk/src/formula.hpp
    trunk/src/formula_ai.cpp
    trunk/src/game.cpp

Modified: trunk/src/formula.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula.cpp?rev=30503&r1=30502&r2=30503&view=diff
==============================================================================
--- trunk/src/formula.cpp (original)
+++ trunk/src/formula.cpp Sat Nov  1 17:57:46 2008
@@ -723,7 +723,7 @@
                                                                                
                parse_expression(tok+1,i2-1,symbols)));
                                                }
                                                catch (formula_error& e){
-                                                       throw formula_error( 
e.type_, tokens_to_string(i1, i2-1), *i1->filename, i1->line_number );
+                                                       throw formula_error( 
e.type, tokens_to_string(i1, i2-1), *i1->filename, i1->line_number );
                                                }
                                        }
                                }
@@ -761,7 +761,7 @@
                                        return expression_ptr( 
create_function(std::string(i1->begin,i1->end),args,symbols) );
                                }
                                catch(formula_error& e) {
-                                       throw formula_error(e.type_, 
tokens_to_string(begin,end), *i1->filename, i1->line_number);
+                                       throw formula_error(e.type, 
tokens_to_string(begin,end), *i1->filename, i1->line_number);
                                }
                        }
                }
@@ -776,7 +776,7 @@
                                                                 
parse_expression(op+1,i2,symbols)));
                }
                catch(formula_error& e) {
-                       throw formula_error( e.type_, 
tokens_to_string(begin,end-1), *op->filename, op->line_number);
+                       throw formula_error( e.type, 
tokens_to_string(begin,end-1), *op->filename, op->line_number);
                }
        }
 

Modified: trunk/src/formula.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula.hpp?rev=30503&r1=30502&r2=30503&view=diff
==============================================================================
--- trunk/src/formula.hpp (original)
+++ trunk/src/formula.hpp Sat Nov  1 17:57:46 2008
@@ -60,15 +60,25 @@
 
 struct formula_error
 {
-       formula_error() : type_(), formula_(), filename_(), line_(0) 
+       formula_error() 
+               : type()
+               , formula()
+               , filename()
+               , line(0) 
        {}
-       formula_error(const std::string& type, const std::string& formula, 
const std::string& file, int line) : 
-       type_(type), formula_(formula), filename_(file), line_(line) 
+
+       formula_error(const std::string& type, const std::string& formula, 
+                       const std::string& file, int line) 
+               : type(type)
+               , formula(formula)
+               , filename(file)
+               , line(line) 
        {}
-       std::string type_;
-       std::string formula_;
-       std::string filename_;
-       int line_;
+
+       std::string type;
+       std::string formula;
+       std::string filename;
+       int line;
 };
 
 }

Modified: trunk/src/formula_ai.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_ai.cpp?rev=30503&r1=30502&r2=30503&view=diff
==============================================================================
--- trunk/src/formula_ai.cpp (original)
+++ trunk/src/formula_ai.cpp Sat Nov  1 17:57:46 2008
@@ -1365,15 +1365,15 @@
 
 void formula_ai::handle_exception(game_logic::formula_error& e, const 
std::string& failed_operation)
 {
-       LOG_AI << failed_operation << ": " << e.formula_ << std::endl;
-       display_message(failed_operation + ": " + e.formula_);
+       LOG_AI << failed_operation << ": " << e.formula << std::endl;
+       display_message(failed_operation + ": " + e.formula);
        //if line number = 0, don't display info about filename and line number
-       if (e.line_ != 0) {
-               LOG_AI << e.type_ << " in " << e.filename_ << ":" << e.line_ << 
std::endl;
-               display_message(e.type_ + " in " + e.filename_ + ":" + 
boost::lexical_cast<std::string>(e.line_));
+       if (e.line != 0) {
+               LOG_AI << e.type << " in " << e.filename << ":" << e.line << 
std::endl;
+               display_message(e.type + " in " + e.filename + ":" + 
boost::lexical_cast<std::string>(e.line));
        } else {
-               LOG_AI << e.type_ << std::endl;
-               display_message(e.type_);
+               LOG_AI << e.type << std::endl;
+               display_message(e.type);
        }
 }
 
@@ -1406,8 +1406,8 @@
                                make_move(formula, callable);
                        }
                        catch(formula_error& e) {
-                               if(e.filename_ == "formula")
-                                       e.line_ = 0;
+                               if(e.filename == "formula")
+                                       e.line = 0;
                                handle_exception( e, "Unit formula error for 
unit: '" + i->second.type_id() + "' standing at (" + 
boost::lexical_cast<std::string>(i->first.x+1) + "," + 
boost::lexical_cast<std::string>(i->first.y+1) + ")");
                        }
 
@@ -1421,8 +1421,8 @@
                                        while ( make_move(loop_formula, 
callable) ) {}
                                }
                                catch(formula_error& e) {
-                                       if(e.filename_ == "formula")
-                                               e.line_ = 0;
+                                       if(e.filename == "formula")
+                                               e.line = 0;
                                        handle_exception( e, "Unit loop formula 
error for unit: '" + i->second.type_id() + "' standing at (" + 
boost::lexical_cast<std::string>(i->first.x+1) + "," + 
boost::lexical_cast<std::string>(i->first.y+1) + ")");
                                }
                        }
@@ -1505,7 +1505,7 @@
                return v.to_debug_string();
        }
        catch(formula_error& e) {
-               e.line_ = 0;
+               e.line = 0;
                handle_exception(e);
                throw;
        }

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=30503&r1=30502&r2=30503&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sat Nov  1 17:57:46 2008
@@ -2132,9 +2132,9 @@
                std::cerr << "WML exception:\nUser message: "
                        << e.user_message << "\nDev message: " << e.dev_message 
<< '\n';
        } catch(game_logic::formula_error& e) {
-               std::cerr << "Formula error found in " << e.filename_ << ":" << 
e.line_
-                       << "\nIn formula " << e.formula_
-                       << "\nError: " << e.type_
+               std::cerr << "Formula error found in " << e.filename << ":" << 
e.line
+                       << "\nIn formula " << e.formula
+                       << "\nError: " << e.type
                        << "\n\nGame will be aborted.\n";
        }
 


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

Reply via email to