mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
Various warning fixes and devirtualization
* Remove ArrayString * devirtualize GetCount and SetCount, they're no longer needed * set storage duration of fmt::placeholder to extern to be consistent * make length unsigned and the return value of sprintf signed * remove dead code "s.Close()" is never reached * devirtualize WrteToLog() * devirtualize Ini functions
This commit is contained in:
parent
1975b7e139
commit
4066950975
6 changed files with 21 additions and 113 deletions
|
@ -78,13 +78,13 @@ namespace fmt{
|
|||
template<typename ... Args>
|
||||
string Format(const string &fmt, Args&& ... parameters)
|
||||
{
|
||||
int length = 256;
|
||||
size_t length = 256;
|
||||
string str;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
std::vector<char> buffptr(length);
|
||||
size_t printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
||||
int printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
||||
if (printlen >= 0 && printlen < length)
|
||||
{
|
||||
str = string(buffptr.data(), printlen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue