]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/locotype.cpp
Reimplement path display
[r2c2.git] / source / libmarklin / locotype.cpp
index 9eed205289a74c61566349f9f239a179e53796c1..7a1becf35ac5152db6d926a1c73673ed271ea895 100644 (file)
@@ -15,6 +15,13 @@ LocoType::LocoType(unsigned an):
        art_nr(an)
 { }
 
+unsigned LocoType::get_max_function() const
+{
+       if(funcs.empty())
+               return 0;
+       return (--funcs.end())->first;
+}
+
 
 LocoType::Loader::Loader(LocoType &lt):
        Msp::DataFile::BasicLoader<LocoType>(lt)
@@ -25,7 +32,7 @@ LocoType::Loader::Loader(LocoType &lt):
 
 void LocoType::Loader::function(unsigned i, const string &f)
 {
-       obj.funcs[i]=f;
+       obj.funcs[i] = f;
 }
 
 } // namespace Marklin