Path: blob/master/libmeteor/source/disassembler/argimmediate.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/argimmediate.hpp"1718#include <sstream>19#include <iomanip>2021namespace AMeteor22{23namespace Disassembler24{25std::string ArgImmediate::GetString () const26{27std::ostringstream ss;28ss << '#';29ss << std::hex << std::setw(2) << std::setfill('0') << m_imm << 'h';30return ss.str();31}3233Argument* ArgImmediate::Clone () const34{35return new ArgImmediate(*this);36}37}38}394041