summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-05-30Fix FreeBSD/clang errors caused by -Werrorlinnemannr1-0/+6
With FreeBSD/clang, -Werror combined with the configured warning flags yields some fatal errors, specifically related to signed conversion, 64 to 32 bit conversion, and tautological compares. CONTRIBUTORS Add myself to the contributor list src/Generating/FinishGen.cpp In cFinishGenPassiveMobs::GetRandomMob(), change the type of RandMob from size_t to the difference_type of the ListOfSpawnables iterator MobIter. Using size_t triggers a 64 bit to 32 bit conversion if the difference_type of the iterator class is 64 bit Also explicitly cast the noise expression to unsigned long so we don't get a signed conversion warning from the modulo against ListOfSpawnables.size() src/OSSupport/StackTrace.cpp FreeBSD 10 and above includes a non glibc implementation of benchmark() for which size_t, not int, is the return type. To account for this and prevent a signed conversion warning, abstract the type for numItems with a macro btsize src/StringUtils.h In StringToInteger(), correct a tautological compare warning for unsigned types with the template. If T is unsigned, comparing std::numeric_limits<T>::min() to the unsigned result is always false. That control can enter this branch in an evaluated template with an unsigned type T may also permit a signed number to be parsed and erroneously stripped of its signedness at runtime. To guard against this and avoid the warning in the case that the number parsed from the string is non-positive, return false and don't try to parse if T is unsigned and control enters the non-positive branch
2015-05-19Fixed a lot of warningstycho1-2/+2
2015-05-09CheckBasicStyle: checks spaces around * and &.Mattes D1-1/+1
2015-03-11Fixes #493 and #490flx51-0/+5
2015-01-27StringUtils: Added string vector manipulation.Mattes D1-1/+10
2015-01-21Fixed warnings in StringUtils.Mattes D1-20/+31
2014-09-27Bug fixTiger Wang1-2/+2
2014-09-17Initial BungeeCord support.madmaxoft1-0/+5
Ref.: #1392
2014-08-29Fixed spaces.Mattes D1-1/+1
2014-08-29Hotfixed recipe.txt loading.Hownaer1-2/+2
2014-08-28More template keyword fixes.Mattes D1-2/+2
2014-08-28Fixed spaces after "template" keyword.Mattes D1-1/+1
2014-08-13Fixed commentsTycho1-5/+5
2014-08-13Added missing headerTycho1-0/+1
2014-08-13Fixed Integer pasing warnings in CraftingRecipies.cppTycho1-0/+62
2014-08-10First Implementatation of new Loggin frameworkTycho1-1/+0
2014-08-04Refactored case-conversion functions.madmaxoft1-2/+5
StrToLower() returns a modified copy of the string, InPlaceLowercase() modifies the string in-place.
2014-08-03Attempting a compilation fix for gcc / clang.madmaxoft1-0/+3
2014-07-17Fixed basic whitespace problems.madmaxoft1-9/+1
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D1-2/+2
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D1-2/+2
2014-05-03cCHunkBuffer that compiles with TestGlobals.hTycho1-0/+3
2014-04-04Fixed CreateHexDump's signedness.madmaxoft1-1/+1
2014-04-04More Clang warning fixes in the protocols.madmaxoft1-1/+1
2014-04-01Exported the Base64 encoding and decoding functions to Lua API.madmaxoft1-2/+2
2014-03-14Fixed xofts issuesTycho1-4/+4
2014-03-11Fixed more Format issuesTycho1-1/+1
2014-03-11Added macros to follow format string checking through wrappersTycho1-3/+3
2014-03-10Fixed Alignment issue in ByteBufferTycho1-1/+1
2014-01-16Another VarArgs fix.madmaxoft1-6/+2
This time using va_copy() on platforms that have it and simple assignment on platforms that don't.
2014-01-15Using a 2nd argument instead of va_copy().madmaxoft1-2/+6
This seems to be the only reasonable C++03-only solution.
2014-01-07Added Base64Encode().madmaxoft1-0/+3
2014-01-02Fixed unaligned memory access in FastNBT.madmaxoft1-0/+9
This should fix #420.
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-22Added cFile:GetFolderContents().madmaxoft1-3/+0
Fix 162.
2013-10-04Added Basic auth support to cHTTPRequest.madmaxoft1-0/+3
2013-10-04Added StrToLower(), URLDecode() and ReplaceAllCharOccurrences().madmaxoft1-0/+3
2013-09-28Added URLDecode() and ReplaceAllCharOccurrences() to StringUtils.madmaxoft1-0/+6
2013-07-07Added StringUtils functions to Lua API; added StripColorCodes(); ChatLog now strips color codes from logged messages.madmaxoft@gmail.com1-4/+7
Fixes FS #398 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1661 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07Fixed sprinting in 1.6.1, made speeds available through API; fixed messages containing quotes.madmaxoft@gmail.com1-0/+3
Fixes FS #415 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1660 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-01StringUtils: Fixed StringSplit to work with multiple delimitersmadmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1438 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-14Added water and lava springs.madmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1269 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-04Moved client socket accepting into a separate thread object, cListenThreadmadmaxoft@gmail.com1-0/+2
MCServer can now listen on multiple ports FS #312 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1252 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-11-15Added a Printf() function that returns a new AString by value.madmaxoft@gmail.com1-0/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1041 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-02Added a CreateHexDump() function for easier raw data debuggingmadmaxoft@gmail.com1-0/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@818 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-28Moved all packet-serializing code into cProtocol125; half the packet classes aren't needed anymore.madmaxoft@gmail.com1-0/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@800 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-23Added a RateCompareString function to StringUtilsfaketruth1-0/+3
Created a preprocessor template (define) for DoWith* functions Exported cWorld::FindAndDoWithPlayer(), cRoot::FindAndDoWithPlayer() and cRoot::ForEachPlayer() to Lua Added a function FindAndDoWithPlayer to cRoot and cWorld. It takes a part of a player name and finds a single player based on that. Fixed Core's MOTD to contain the correct URL to the MCServer site Fixed Core /kick command Fixed Core's WebAdmin kick git-svn-id: http://mc-server.googlecode.com/svn/trunk@779 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-17Packets now parse themselves from a cByteBuffer object (1st part of packeting rewrite, http://forum.mc-server.org/showthread.php?tid=524 )madmaxoft@gmail.com1-0/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@744 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-62/+62
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-04Added the new recipe parser, parsing the crafting.txt file. Included are a few recipes. The old parser still works, but will be replaced soon.madmaxoft@gmail.com1-0/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@549 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-25A globally-accessible OS-independent GetDirectoryContents() function for listing all objects in a folder as an AStringListmadmaxoft@gmail.com1-0/+5
git-svn-id: http://mc-server.googlecode.com/svn/trunk@433 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-18Moved stdarg.h inclusion into Globals.hmadmaxoft@gmail.com1-4/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@289 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-03MCServer should be running fast again on Linux!! YAAAY!!faketruth1-0/+4
It seems the intialization of MersenneTwister was really slow on Linux because it did some file reading. Doing this 200 times a tick can be pretty slow... StringUtils didn't compile in Cygwin due to missing va_list definition git-svn-id: http://mc-server.googlecode.com/svn/trunk@230 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Rewritten cAuthenticator to make use of the new cIsThread architecture - now authentication runs in a single separate thread for all clients;madmaxoft@gmail.com1-0/+3
Global player-kicking function (cServer, cRoot); More char * -> AString conversion git-svn-id: http://mc-server.googlecode.com/svn/trunk@221 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Introducing StringUtils - the place to be if you are a generic string routine :) No more sprintf()!madmaxoft@gmail.com1-0/+51
git-svn-id: http://mc-server.googlecode.com/svn/trunk@209 0a769ca7-a7f5-676a-18bf-c427514a06d6