X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fpath.cpp;h=5f7cc094767159832ce7c79fea12040a83088dea;hb=113cdbf07f441329690714a53a436503ab1d4b35;hp=e4c415ec49fbf34e593eb756f75e8d64466cbb55;hpb=02288dc76442bd6616a200a2d22c0954d2fc8180;p=supertux.git diff --git a/src/object/path.cpp b/src/object/path.cpp index e4c415ec4..5f7cc0947 100644 --- a/src/object/path.cpp +++ b/src/object/path.cpp @@ -1,5 +1,5 @@ // $Id$ -// +// // SuperTux Path // Copyright (C) 2005 Philipp // Copyright (C) 2006 Christoph Sommer @@ -14,7 +14,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -26,7 +26,7 @@ #include "lisp/lisp.hpp" #include "lisp/list_iterator.hpp" #include "object_factory.hpp" -#include "msg.hpp" +#include "log.hpp" #include #include @@ -51,7 +51,7 @@ Path::read(const lisp::Lisp& reader) if(iter.item() == "mode") { std::string mode_string; if(!iter.value()->get(mode_string)) - throw new std::runtime_error("Pathmode not a string"); + throw std::runtime_error("Pathmode not a string"); if(mode_string == "oneshot") mode = ONE_SHOT; @@ -62,13 +62,13 @@ Path::read(const lisp::Lisp& reader) else { std::ostringstream msg; msg << "Unknown pathmode '" << mode_string << "' found"; - throw new std::runtime_error(msg.str()); + throw std::runtime_error(msg.str()); } continue; } if(iter.item() != "node") { - msg_warning("unknown token '" << iter.item() << "' in Path nodes list. Ignored."); + log_warning << "unknown token '" << iter.item() << "' in Path nodes list. Ignored." << std::endl; continue; } const lisp::Lisp* node_lisp = iter.lisp(); @@ -78,7 +78,7 @@ Path::read(const lisp::Lisp& reader) node.time = 1; if( (!node_lisp->get("x", node.position.x) || !node_lisp->get("y", node.position.y))) - throw new std::runtime_error("Path node without x and y coordinate specified"); + throw std::runtime_error("Path node without x and y coordinate specified"); node_lisp->get("time", node.time); if(node.time <= 0) @@ -107,7 +107,7 @@ Path::write(lisp::Writer& writer) writer.write_string("mode", "circular"); break; default: - msg_warning("Don't know how to write mode " << (int) mode << " ?!?"); + log_warning << "Don't know how to write mode " << (int) mode << " ?!?" << std::endl; break; }