mirror of https://github.com/PCSX2/pcsx2.git
wxWidgets/Win32: Cure wxWidgets of some over-joyous re-allocation of formatted strings which was (presumably) added because of limited memory constraints on portable devices (which doesn't apply to PCSX2).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2039 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
2cb8e571cd
commit
4047e0ee9f
|
@ -1970,8 +1970,17 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
|
|||
}
|
||||
|
||||
// we could have overshot
|
||||
Shrink();
|
||||
// PCSX2: And we could have 4gb of ram and not really give a hoot if we overshoot
|
||||
// the length of a temporary string by 0.5kb, which itself will likely be free'd a few
|
||||
// instructions later. Also, this defeats the purpose of even using the 1kb "overshot"
|
||||
// starting buffer size at the top of the function. Ideally if you are really concerned
|
||||
// about memory, the 1024 should be a 512, and this should only shrink if the allocated
|
||||
// length of the string is more than 128 bytes past the end of the actual string content.
|
||||
// -- Jake Stine (air)
|
||||
|
||||
//if( capacity() - 128 >= length() ) // this line added by air, as proposed above.
|
||||
// Shrink();
|
||||
|
||||
return length();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue