Changed several string invocations to use references instead. For the

Cart class it's simply an optimization, but the Distella change actually
modifies the list of addresses (vs. modifying a copy of the list).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2137 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-09-30 15:56:38 +00:00
parent 80aa24a8f8
commit d6a38c8e44
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
: myDbg(dbg),
myList(list)
{
CartDebug::AddressList addresses = info.addressList;
CartDebug::AddressList& addresses = info.addressList;
if(addresses.size() == 0)
return;

View File

@ -73,7 +73,7 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
string autodetect = "";
if(type == "AUTO-DETECT" || settings.getBool("rominfo"))
{
string detected = autodetectType(image, size);
const string& detected = autodetectType(image, size);
autodetect = "*";
if(type != "AUTO-DETECT" && type != detected)
cerr << "Auto-detection not consistent: " << type << ", " << detected << endl;