diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-05 01:02:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-05 01:24:38 +0300 |
commit | 7594ad94dfdf580a82fb07ddb346442160b3d91d (patch) | |
tree | 9c9d0fc0b9ea0b7b1f4c550454ed0e3b458b7e2d /src/fs/virtfs/virtfsrwops.cpp | |
parent | 78195f2492032637bfa9ce663ae7903dbf07f609 (diff) | |
download | manaverse-7594ad94dfdf580a82fb07ddb346442160b3d91d.tar.gz manaverse-7594ad94dfdf580a82fb07ddb346442160b3d91d.tar.bz2 manaverse-7594ad94dfdf580a82fb07ddb346442160b3d91d.tar.xz manaverse-7594ad94dfdf580a82fb07ddb346442160b3d91d.zip |
Add VirtFs namespace into all files in virtfs directory.
Diffstat (limited to 'src/fs/virtfs/virtfsrwops.cpp')
-rw-r--r-- | src/fs/virtfs/virtfsrwops.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/fs/virtfs/virtfsrwops.cpp b/src/fs/virtfs/virtfsrwops.cpp index 101ce66b6..ab13c3f4e 100644 --- a/src/fs/virtfs/virtfsrwops.cpp +++ b/src/fs/virtfs/virtfsrwops.cpp @@ -56,7 +56,10 @@ #include "debug.h" -SDL_RWops *VirtFs::create_rwops(VirtFile *const file) +namespace VirtFs +{ + +SDL_RWops *create_rwops(VirtFile *const file) { SDL_RWops *retval = nullptr; @@ -89,13 +92,13 @@ static bool checkFilePath(const std::string &restrict fname) { if (fname.empty()) return false; - if (!VirtFs::exists(fname) || VirtFs::isDirectory(fname)) + if (!exists(fname) || isDirectory(fname)) return false; return true; } #endif // __APPLE__ -SDL_RWops *VirtFs::rwopsOpenRead(const std::string &restrict fname) +SDL_RWops *rwopsOpenRead(const std::string &restrict fname) { BLOCK_START("RWopsopenRead") #ifdef __APPLE__ @@ -108,34 +111,36 @@ SDL_RWops *VirtFs::rwopsOpenRead(const std::string &restrict fname) #endif // USE_FUZZER #ifdef USE_PROFILER - SDL_RWops *const ret = VirtFs::create_rwops(VirtFs::openRead(fname)); + SDL_RWops *const ret = create_rwops(openRead(fname)); BLOCK_END("RWopsopenRead") return ret; #else // USE_PROFILER - return VirtFs::create_rwops(VirtFs::openRead(fname)); + return create_rwops(openRead(fname)); #endif // USE_PROFILER } /* RWopsopenRead */ -SDL_RWops *VirtFs::rwopsOpenWrite(const std::string &restrict fname) +SDL_RWops *rwopsOpenWrite(const std::string &restrict fname) { #ifdef __APPLE__ if (!checkFilePath(fname)) return nullptr; #endif // __APPLE__ - return VirtFs::create_rwops(VirtFs::openWrite(fname)); + return create_rwops(openWrite(fname)); } /* RWopsopenWrite */ -SDL_RWops *VirtFs::rwopsOpenAppend(const std::string &restrict fname) +SDL_RWops *rwopsOpenAppend(const std::string &restrict fname) { #ifdef __APPLE__ if (!checkFilePath(fname)) return nullptr; #endif // __APPLE__ - return VirtFs::create_rwops(VirtFs::openAppend(fname)); + return create_rwops(openAppend(fname)); } /* RWopsopenAppend */ +} // namespace VirtFs + /* end of virtfsrwops.c ... */ |