X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tool%2Fcompiler.cpp;h=8725bea3e90c9c2eff8e3e85f21212220e26115c;hb=9867e5fdf99d7d6c9d83846c11a1cee6a9919be1;hp=8c280c4a2ec2a3d0ec3ed07fd72235d15a8bc92c;hpb=cbd0ddd6ee033e46646bfb85d19232c816ea1eda;p=libs%2Fdatafile.git diff --git a/tool/compiler.cpp b/tool/compiler.cpp index 8c280c4..8725bea 100644 --- a/tool/compiler.cpp +++ b/tool/compiler.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #include #include @@ -53,11 +46,12 @@ bool Compiler::process_statement(const FS::Path &fn, DataFile::Statement &st) return true; for(vector::iterator i = st.args.begin(); i!=st.args.end(); ++i) - if(i->get_type()==DataFile::STRING) + if(i->get_signature()==DataFile::StringType::signature) { - if(i->get_raw()=="$filename") + string value = i->get(); + if(value=="$filename") *i = DataFile::Value(FS::basename(fn.str())); - else if(i->get_raw()=="$content") + else if(value=="$content") { IO::File in(fn.str()); string data;