Revision: 2671 http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2671&view=rev Author: ulteq Date: 2012-05-26 01:21:08 +0000 (Sat, 26 May 2012) Log Message: ----------- cleanup
Modified Paths: -------------- trunk/source/main/utils/utils.cpp trunk/source/main/utils/utils.h Modified: trunk/source/main/utils/utils.cpp =================================================================== --- trunk/source/main/utils/utils.cpp 2012-05-26 00:13:05 UTC (rev 2670) +++ trunk/source/main/utils/utils.cpp 2012-05-26 01:21:08 UTC (rev 2671) @@ -19,17 +19,15 @@ */ #include "utils.h" -#include "RoRPrerequisites.h" +#include "Ogre.h" #include "rornet.h" #include "RoRVersion.h" +#include "sha1.h" #ifndef WIN32 #include <iconv.h> #endif //WIN32 -#include "sha1.h" - -#include "Ogre.h" using namespace Ogre; String hexdump(void *pAddressIn, long lSize) @@ -371,7 +369,7 @@ return value; } -Ogre::String generateHashFromDataStream(Ogre::DataStreamPtr &ds) +String generateHashFromDataStream(DataStreamPtr &ds) { // copy whole file into a buffer uint8_t *buf = 0; @@ -398,9 +396,9 @@ return String(hash_result); } -Ogre::String generateHashFromFile(Ogre::String filename) +String generateHashFromFile(String filename) { // no exception handling in here DataStreamPtr ds = ResourceGroupManager::getSingleton().openResource(filename, ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME); return generateHashFromDataStream(ds); -} \ No newline at end of file +} Modified: trunk/source/main/utils/utils.h =================================================================== --- trunk/source/main/utils/utils.h 2012-05-26 00:13:05 UTC (rev 2670) +++ trunk/source/main/utils/utils.h 2012-05-26 01:21:08 UTC (rev 2671) @@ -19,13 +19,11 @@ */ // created by Thomas Fischer thomas{AT}thomasfischer{DOT}biz, 9th of August 2009 -#ifndef UTILS_H_ -#define UTILS_H_ +#ifndef __UTILS_H_ +#define __UTILS_H_ #include "RoRPrerequisites.h" -#include <OgrePrerequisites.h> -#include <OgreUTFString.h> #include <OgreDataStream.h> #ifdef USE_MYGUI @@ -136,7 +134,8 @@ Ogre::Real Round(Ogre::Real value, unsigned short ndigits = 0); -// generates a hash from a Datastream, beware, its loading the whole thing into a bufer, so its not suited for big files +// generates a hash from a DataStream, beware, its loading the whole thing into a buffer, so its not suited for big files Ogre::String generateHashFromDataStream(Ogre::DataStreamPtr &ds); Ogre::String generateHashFromFile(Ogre::String filename); -#endif //UTILS_H_ + +#endif // __UTILS_H_ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Rigsofrods-devel mailing list Rigsofrods-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel