diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 5e10478c9..38dd17245 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -328,7 +328,7 @@ void Networking::preInit(std::vector &content, Files::Collections & if (col.doesExist(*it)) { PacketPreInit::HashList hashList; - unsigned crc32 = Utils::crc32checksum(col.getPath(*it).string()); + unsigned crc32 = Utils::crc32Checksum(col.getPath(*it).string()); hashList.push_back(crc32); checksums.push_back(make_pair(*it, hashList)); diff --git a/components/openmw-mp/Utils.cpp b/components/openmw-mp/Utils.cpp index bd8e25d32..14a194268 100644 --- a/components/openmw-mp/Utils.cpp +++ b/components/openmw-mp/Utils.cpp @@ -54,7 +54,7 @@ void Utils::timestamp() } // http://stackoverflow.com/questions/1637587/c-libcurl-console-progress-bar -int Utils::progress_func(double TotalToDownload, double NowDownloaded) +int Utils::progressFunc(double TotalToDownload, double NowDownloaded) { // how wide you want the progress meter to be int totaldotz=40; @@ -79,7 +79,7 @@ int Utils::progress_func(double TotalToDownload, double NowDownloaded) return 1; } -bool Utils::DoubleCompare(double a, double b, double epsilon) +bool Utils::compareDoubles(double a, double b, double epsilon) { return fabs(a - b) < epsilon; } @@ -91,7 +91,7 @@ std::string Utils::toString(int num) return stream.str(); } -string Utils::str_replace(const string& source, const char* find, const char* replace) +string Utils::replaceString(const string& source, const char* find, const char* replace) { unsigned int find_len = strlen(find); unsigned int replace_len = strlen(replace); @@ -108,7 +108,7 @@ string Utils::str_replace(const string& source, const char* find, const char* re return dest; } -string& Utils::RemoveExtension(string& file) +string& Utils::removeExtension(string& file) { size_t pos = file.find_last_of('.'); @@ -118,7 +118,7 @@ string& Utils::RemoveExtension(string& file) return file; } -long int Utils::FileLength(const char* file) +long int Utils::getFileLength(const char* file) { FILE* _file = fopen(file, "rb"); @@ -132,7 +132,7 @@ long int Utils::FileLength(const char* file) return size; } -unsigned int ::Utils::crc32checksum(const std::string &file) +unsigned int ::Utils::crc32Checksum(const std::string &file) { boost::crc_32_type crc32; boost::filesystem::ifstream ifs(file, std::ios_base::binary); diff --git a/components/openmw-mp/Utils.hpp b/components/openmw-mp/Utils.hpp index 78bf99c8a..00cbd8cab 100644 --- a/components/openmw-mp/Utils.hpp +++ b/components/openmw-mp/Utils.hpp @@ -22,19 +22,19 @@ namespace Utils void timestamp(); - int progress_func(double TotalToDownload, double NowDownloaded); + int progressFunc(double TotalToDownload, double NowDownloaded); - bool DoubleCompare(double a, double b, double epsilon); + bool compareDoubles(double a, double b, double epsilon); - std::string str_replace(const std::string &source, const char *find, const char *replace); + std::string replaceString(const std::string &source, const char *find, const char *replace); std::string toString(int num); - std::string &RemoveExtension(std::string &file); + std::string &removeExtension(std::string &file); - long int FileLength(const char *file); + long int getFileLength(const char *file); - unsigned int crc32checksum(const std::string &file); + unsigned int crc32Checksum(const std::string &file); void printWithWidth(std::ostringstream &sstr, std::string str, size_t width);