Skip to content

Commit

Permalink
Remove use of fmt from squtils.h
Browse files Browse the repository at this point in the history
Fixes link warning on MinGW
  • Loading branch information
JGRennison committed Jul 31, 2023
1 parent 748ff13 commit f4d237e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/3rdparty/squirrel/squirrel/squtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef _SQUTILS_H_
#define _SQUTILS_H_

#include "../../../core/format.hpp"
#include "../../../string_func.h"
#include "../../../script/script_fatalerror.hpp"
#include <type_traits>

Expand Down Expand Up @@ -108,8 +108,8 @@ template<typename T> class sqvector
{
newsize = (newsize > 0)?newsize:4;
if (newsize > SIZE_MAX / sizeof(T)) {
std::string msg = fmt::format("cannot resize to {}", newsize);
throw Script_FatalError(msg);
std::string msg = stdstr_fmt("cannot resize to " PRINTF_SIZE, (size_t)newsize);
throw Script_FatalError(std::move(msg));
}
_vals = (T*)SQ_REALLOC(_vals, _allocated * sizeof(T), newsize * sizeof(T));
_allocated = (size_t)newsize;
Expand Down

0 comments on commit f4d237e

Please sign in to comment.