diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-07-08 10:50:18 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-07-08 10:50:18 -0400 |
commit | 3e6c7c189ba3d623845dfc385f143cc49e4be8aa (patch) | |
tree | 5e0dfa828891d67c230736a6cf4f5adeb2216097 /cpp/src/IceUtil | |
parent | Additional UWP fix for ICE-7172 (diff) | |
download | ice-3e6c7c189ba3d623845dfc385f143cc49e4be8aa.tar.bz2 ice-3e6c7c189ba3d623845dfc385f143cc49e4be8aa.tar.xz ice-3e6c7c189ba3d623845dfc385f143cc49e4be8aa.zip |
Removed IceUtilInternal ifstream and ofstream
Diffstat (limited to 'cpp/src/IceUtil')
-rw-r--r-- | cpp/src/IceUtil/FileUtil.cpp | 91 |
1 files changed, 4 insertions, 87 deletions
diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp index 4e3dc407804..13cedac2d2a 100644 --- a/cpp/src/IceUtil/FileUtil.cpp +++ b/cpp/src/IceUtil/FileUtil.cpp @@ -344,68 +344,13 @@ IceUtilInternal::FileLock::~FileLock() unlink(_path); } -IceUtilInternal::ifstream::ifstream() +#ifndef __MINGW32__ +const wchar_t* +IceUtilInternal::streamFilename(const string& filename) { + return IceUtil::stringToWstring(filename, IceUtil::getProcessStringConverter()).c_str(); } - -IceUtilInternal::ifstream::ifstream(const string& path, ios_base::openmode mode) : -#ifdef __MINGW32__ - std::ifstream(path.c_str(), mode) -#else - // - // Don't need to use a wide string converter, the wide string is directly passed - // to Windows API. - // - std::ifstream(IceUtil::stringToWstring(path, IceUtil::getProcessStringConverter()).c_str(), mode) -#endif -{ -} - -void -IceUtilInternal::ifstream::open(const string& path, ios_base::openmode mode) -{ -#ifdef __MINGW32__ - std::ifstream::open(path.c_str(), mode); -#else - // - // Don't need to use a wide string converter, the wide string is directly passed - // to Windows API. - // - std::ifstream::open(IceUtil::stringToWstring(path, IceUtil::getProcessStringConverter()).c_str(), mode); #endif -} - -IceUtilInternal::ofstream::ofstream() -{ -} - -IceUtilInternal::ofstream::ofstream(const string& path, ios_base::openmode mode) : -#ifdef __MINGW32__ - std::ofstream(path.c_str(), mode) -#else - // - // Don't need to use a wide string converter, the wide string is directly passed - // to Windows API. - // - std::ofstream(IceUtil::stringToWstring(path, IceUtil::getProcessStringConverter()).c_str(), mode) -#endif -{ -} - -void -IceUtilInternal::ofstream::open(const string& path, ios_base::openmode mode) -{ -#ifdef __MINGW32__ - std::ofstream::open(path.c_str(), mode); -#else - // - // Don't need to use a wide string converter, the wide string is directly passed - // to Windows API. - // - std::ofstream::open(IceUtil::stringToWstring(path, IceUtil::getProcessStringConverter()).c_str(), mode); -#endif -} - #else @@ -541,32 +486,4 @@ IceUtilInternal::FileLock::~FileLock() unlink(_path); } -IceUtilInternal::ifstream::ifstream() -{ -} - -IceUtilInternal::ifstream::ifstream(const string& path, ios_base::openmode mode) : std::ifstream(path.c_str(), mode) -{ -} - -void -IceUtilInternal::ifstream::open(const string& path, ios_base::openmode mode) -{ - std::ifstream::open(path.c_str(), mode); -} - -IceUtilInternal::ofstream::ofstream() -{ -} - -IceUtilInternal::ofstream::ofstream(const string& path, ios_base::openmode mode) : std::ofstream(path.c_str(), mode) -{ -} - -void -IceUtilInternal::ofstream::open(const string& path, ios_base::openmode mode) -{ - std::ofstream::open(path.c_str(), mode); -} - #endif |