diff --git a/JGE/src/zipFS/zfsystem.cpp b/JGE/src/zipFS/zfsystem.cpp index 5367ae652..7fe932dbe 100644 --- a/JGE/src/zipFS/zfsystem.cpp +++ b/JGE/src/zipFS/zfsystem.cpp @@ -2,8 +2,8 @@ // // zfsystem.cpp: implementation of the zip file system classes. -// -// Copyright (C) 2004 Tanguy Fautré. +// +// Copyright (C) 2004 Tanguy Fautré. // For conditions of distribution and use, // see copyright notice in zfsystem.h // @@ -72,7 +72,7 @@ filesystem::filesystem(const char * BasePath, const char * FileExt, bool Default // Open each zip files that have been found, in alphabetic order sort(ZipFiles.begin(), ZipFiles.end()); - for (vector::const_iterator ZipIt = ZipFiles.begin(); ZipIt != ZipFiles.end(); ++ZipIt) + for (vector::const_iterator ZipIt = ZipFiles.begin(); ZipIt != ZipFiles.end(); ++ZipIt) InsertZip(ZipIt->c_str(), ZipIt - ZipFiles.begin()); // Should we make this the default File System for ifile? @@ -98,7 +98,7 @@ void filesystem::Open(izfstream & File, const char * Filename) // File is not zipped if (FileNotZipped(FullPath.c_str())) { - // Link the izfile object with an opened filebuf + // Link the izfile object with an opened filebuf filebuf * FileBuf = new filebuf; FileBuf->open(FullPath.c_str(), ios::binary | ios::in); @@ -164,7 +164,7 @@ void filesystem::Open(izfstream & File, const char * Filename) File.m_Offset = FileInfo.m_Offset; } } - + } } } @@ -189,7 +189,7 @@ bool filesystem::DirExists(const std::string & folderName) return true; #else struct stat st; - if (stat(FullPath.c_str(), &st) == 0) + if (stat(FullPath.c_str(), &st) == 0) return true; #endif @@ -216,7 +216,7 @@ bool filesystem::FileExists(const std::string & fileName) return true; #else struct stat st; - if (stat(FullPath.c_str(), &st) == 0) + if (stat(FullPath.c_str(), &st) == 0) return true; #endif @@ -239,12 +239,12 @@ std::vector& filesystem::scanfolder(const std::string& folderName, std::transform(folderNameLC.begin(), folderNameLC.end(), folderNameLC.begin(), ::tolower); size_t length = folderNameLC.length(); - while(++It != m_Files.end()) + while(++It != m_Files.end()) { string currentFile = (* It).first; string currentFileLC = currentFile; std::transform(currentFileLC.begin(), currentFileLC.end(), currentFileLC.begin(), ::tolower); - if (currentFileLC.find(folderNameLC) == 0) + if (currentFileLC.find(folderNameLC) == 0) { string relativePath = currentFile.substr(length); size_t pos = relativePath.find_first_of("/\\"); @@ -275,7 +275,7 @@ bool filesystem::FileNotZipped(const char * FilePath) const if (! File) return false; - + return true; } @@ -311,7 +311,7 @@ const string & filesystem::FindZip(size_t PackID) const void filesystem::InsertZip(const char * Filename, const size_t PackID) { zipfile_info ZipInfo; - + // Get full path to the zip file and prepare ZipInfo ZipInfo.m_Filename = Filename; string ZipPath = m_BasePath + Filename; @@ -353,7 +353,7 @@ void filesystem::InsertZip(const char * Filename, const size_t PackID) ZipInfo.m_FilesSize += FileHdr.m_UncompSize; ZipInfo.m_FilesCompSize += FileHdr.m_CompSize; } - } + } File.close(); @@ -368,7 +368,7 @@ void filesystem::InsertZip(const char * Filename, const size_t PackID) bool filesystem::PreloadZip(const char * Filename, map& target) { zipfile_info ZipInfo; - + // Open zip izfstream File; File.open(Filename, this); @@ -380,7 +380,7 @@ bool filesystem::PreloadZip(const char * Filename, map