From 68ee086a1f61dd9a886c96dae8d30de7c9d535fb Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 5 Feb 2015 17:33:27 -0800 Subject: Kill off some more unreachable fopen's. The bstring's read from file is unused. The load from file paths aren't taken. R=jam@chromium.org Review URL: https://codereview.chromium.org/902943003 --- core/src/fxcrt/fx_basic_bstring.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'core/src/fxcrt') diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp index 39104e29f6..5c8a2fa8f3 100644 --- a/core/src/fxcrt/fx_basic_bstring.cpp +++ b/core/src/fxcrt/fx_basic_bstring.cpp @@ -936,22 +936,6 @@ void CFX_ByteString::SetAt(FX_STRSIZE nIndex, FX_CHAR ch) CopyBeforeWrite(); m_pData->m_String[nIndex] = ch; } -CFX_ByteString CFX_ByteString::LoadFromFile(FX_BSTR filename) -{ - FXSYS_FILE* file = FXSYS_fopen(CFX_ByteString(filename), "rb"); - if (file == NULL) { - return CFX_ByteString(); - } - FXSYS_fseek(file, 0, FXSYS_SEEK_END); - int len = FXSYS_ftell(file); - FXSYS_fseek(file, 0, FXSYS_SEEK_SET); - CFX_ByteString str; - FX_LPSTR buf = str.GetBuffer(len); - FXSYS_fread(buf, 1, len, file); - str.ReleaseBuffer(len); - FXSYS_fclose(file); - return str; -} CFX_WideString CFX_ByteString::UTF8Decode() const { CFX_UTF8Decoder decoder; -- cgit v1.2.3