mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 11:32:31 +00:00
Remove u32
It's better to use types from the standard library.
This commit is contained in:
185 files changed
+878
-938
No files matched your search
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
@@ -42,7 +41,7 @@ bool Script::ParseJSON(const Script::Request& rq, const std::string& string_utf8
|
||||
{
|
||||
std::wstring attrsW = wstring_from_utf8(string_utf8);
|
||||
std::u16string string(attrsW.begin(), attrsW.end());
|
||||
if (JS_ParseJSON(rq.cx, string.c_str(), (u32)string.size(), out))
|
||||
if (JS_ParseJSON(rq.cx, string.c_str(), static_cast<std::uint32_t>(string.size()), out))
|
||||
return true;
|
||||
|
||||
Script::Exception::CatchPending(rq);
|
||||
@@ -77,7 +76,7 @@ namespace
|
||||
{
|
||||
struct Stringifier
|
||||
{
|
||||
static bool callback(const char16_t* buf, u32 len, void* data)
|
||||
static bool callback(const char16_t* buf, std::uint32_t len, void* data)
|
||||
{
|
||||
std::u16string str(buf, buf+len);
|
||||
std::wstring strw(str.begin(), str.end());
|
||||
|
||||
Reference in new issue
Block a user