From a74e9c9d3b0d98c5d6042d7ca739cd921a4524db Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 29 Feb 2016 14:03:09 -0500 Subject: Using size_t to silence warnings. Change a couple int32_t's to size_t in order to fix warnings on OSX. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1747793002 . --- xfa/src/fgas/src/font/fx_stdfontmgr.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/src/fgas') diff --git a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp index b363ccbdd7..6ad4918203 100644 --- a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp +++ b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp @@ -485,11 +485,12 @@ const FX_CHAR* g_FontFolders[] = { "/system/fonts", #endif }; + CFX_FontSourceEnum_File::CFX_FontSourceEnum_File() { - for (int32_t i = 0; i < sizeof(g_FontFolders) / sizeof(const FX_CHAR*); i++) { + for (size_t i = 0; i < FX_ArraySize(g_FontFolders); ++i) m_FolderPaths.Add(g_FontFolders[i]); - } } + CFX_ByteString CFX_FontSourceEnum_File::GetNextFile() { Restart: void* pCurHandle = @@ -1119,11 +1120,9 @@ static const FX_BitCodePage g_Bit2CodePage[] = { }; FX_WORD FX_GetCodePageBit(FX_WORD wCodePage) { - for (int32_t i = 0; i < sizeof(g_Bit2CodePage) / sizeof(FX_BitCodePage); - i++) { - if (g_Bit2CodePage[i].wCodePage == wCodePage) { + for (size_t i = 0; i < FX_ArraySize(g_Bit2CodePage); ++i) { + if (g_Bit2CodePage[i].wCodePage == wCodePage) return g_Bit2CodePage[i].wBit; - } } return (FX_WORD)-1; } -- cgit v1.2.3