X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fir2midi%2Fcommand_insert.cpp;h=c77a7c4f8f8dbd39eb1e6312f689f813fbb00f71;hb=d4650ef055992adc3a70fb62176eb92c17029f32;hp=365aa1cfe2669769bff30a68d5afa073e01683e5;hpb=fc0c63d5fd7c7126aafc4d68abc8afb862a6b85c;p=yamml%2Fyamml-git.git diff --git a/src/ir2midi/command_insert.cpp b/src/ir2midi/command_insert.cpp index 365aa1c..c77a7c4 100644 --- a/src/ir2midi/command_insert.cpp +++ b/src/ir2midi/command_insert.cpp @@ -39,24 +39,13 @@ public: virtual void Process(const AST::Command& ast) override { ValidateArguments(ast); - GetCompiler()->CompileTrackBlock(boost::get(ast.Arguments[0].Value)); + GetCompiler()->CompileTrackBlock(boost::get(ast.Arguments[0].Value), ast.Location); } void ValidateArguments(const AST::Command& ast) { ValidateArgCount(ast, 1); ValidateArgType(ast, 0, typeid(std::string)); - - auto name = boost::get(ast.Arguments[0].Value); - - if (!GetCompiler()->HasTrackBlock(name)) - { - ThrowMessage( - Message::MessageID::NoSuchCompositionName, - ast.Location, - {name} - ); - } } private: