Path: blob/master/libmeteor/source/disassembler/arguments.cpp
2 views
// Meteor - A Nintendo Gameboy Advance emulator1// Copyright (C) 2009-2011 Philippe Daouadi2//3// This program is free software: you can redistribute it and/or modify4// it under the terms of the GNU General Public License as published by5// the Free Software Foundation, either version 3 of the License, or6// (at your option) any later version.7//8// This program is distributed in the hope that it will be useful,9// but WITHOUT ANY WARRANTY; without even the implied warranty of10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11// GNU General Public License for more details.12//13// You should have received a copy of the GNU General Public License14// along with this program. If not, see <http://www.gnu.org/licenses/>.1516#include "ameteor/disassembler/arguments.hpp"1718namespace AMeteor19{20namespace Disassembler21{22Arguments::~Arguments ()23{24Clear();25}2627void Arguments::Clear ()28{29for (std::vector<Argument*>::iterator iter = m_args.begin();30iter != m_args.end(); ++iter)31{32delete *iter;33}34m_args.clear();35}3637std::string Arguments::GetString () const38{39std::string out;40for (std::vector<Argument*>::const_iterator iter = m_args.begin();41iter != m_args.end(); ++iter)42{43if (!out.empty())44out += ", ";45out += (*iter)->GetString();46}47return out;48}49}50}515253