]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/speedquantizer.cpp
BasicLoader is now called ObjectLoader
[r2c2.git] / source / libr2c2 / speedquantizer.cpp
index acd1983f0ab0d42eee5da5509b0e331eaab04d54..9fa127cb3125fcce5868416d71535558d98195e8 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2011  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #include "speedquantizer.h"
 
 using namespace std;
@@ -17,13 +10,13 @@ SpeedQuantizer::SpeedQuantizer(unsigned n):
        weight_limit(10)
 {
        if(n<1)
-               throw InvalidParameterValue("Must have at leats one speed step");
+               throw invalid_argument("SpeedQuantizer::SpeedQuantizer");
 }
 
 void SpeedQuantizer::learn(unsigned i, float s, float w)
 {
        if(i>=steps.size())
-               throw InvalidParameterValue("Speed step index out of range");
+               throw out_of_range("SpeedQuantizer::learn");
        steps[i].add(s, w);
 }