]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trackpart.cpp
Detect curved turnouts and assign appropriate symbols to them
[r2c2.git] / source / libr2c2 / trackpart.cpp
index d60d374091556b2f89441e9febfc4ddda4ebd7fa..8c0c2d0038fdf3a6cf7c1a50b0f747c46cf95208 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2006-2011  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #include <cmath>
 #include "trackpart.h"
 
@@ -88,7 +81,7 @@ void TrackPart::check_link(TrackPart &other)
 TrackPart *TrackPart::get_link(unsigned i) const
 {
        if(i>=2)
-               throw InvalidParameterValue("Index out of range");
+               throw out_of_range("TrackPart::get_link");
        return links[i];
 }
 
@@ -121,7 +114,7 @@ bool TrackPart::collide_ray(const Vector &start, const Vector &ray, float width)
 
 
 TrackPart::Loader::Loader(TrackPart &p):
-       Msp::DataFile::BasicLoader<TrackPart>(p)
+       Msp::DataFile::ObjectLoader<TrackPart>(p)
 {
        add("start",    &Loader::start);
        add("length",   &TrackPart::length);