X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpart.cpp;h=127397924f19cf5039b2fe8f1b34df780be8ed8f;hb=11d1b67a9180a0e468b56e355fbe0c88d104ef72;hp=f2797f9058ad66fe8633256c286eb3b794fe8cab;hpb=73afd124ab87e8bace98db55517a56c797a9b8c7;p=libs%2Fgltk.git diff --git a/source/part.cpp b/source/part.cpp index f2797f9..1273979 100644 --- a/source/part.cpp +++ b/source/part.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgltk -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #include "geometry.h" #include "part.h" @@ -25,7 +18,7 @@ Part::Part(const string &n): const Graphic *Part::get_graphic(State state) const { if(state>N_STATES_) - throw InvalidParameterValue("Invalid state"); + throw invalid_argument("Part::get_graphic"); return graphic[state]; } @@ -66,7 +59,7 @@ Part::Loader::~Loader() void Part::Loader::graphic(State s, const string &n) { - Graphic *grph = get_collection().get(n); + Graphic *grph = &get_collection().get(n); for(int i=0; i