| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Overhaul endian handling in ByteBuffer and FastNBT
Rather than juggling "swapped" and "unswapped" versions of integers, different library functions, #defines, etc., simply always read everything byte-by-byte.
This works regardless of host CPU endian, got optimised down to either a normal load or a byteswap on every compiler I tested - only 1 instruction on most CPU architectures.
This commit introduces a "Bytes" array type to keep endian-sensitive data seperate from host data, alongside the needed C++ template machinery for it to work seamlessly. This approach is a little bit safer as well since you get length- and type-checking for most callsites.
* Remove remaining references to old-style endianness conversion, remove functions themselves.
---------
Co-authored-by: Alexander Harkness <me@bearbin.net>
|
|
|
|
|
| |
Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments.
Also fixed code-style violations already present in the code.
|
| |
|
|
|
|
|
|
| |
+ Use libdeflate
+ Use std::byte
* Fix passing temporary to string_view
+ Emulate make_unique_for_overwrite
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Removed BiomeDef.h
* Removed ChunkDef.h from Globals.h
* Added to CONTRIBUTORS.
* Re-added empty last line to Globals.h
* Included stddef and StringUtils in BiomeDef.h
* Fixed build tools compiling. It compiles, but at what cost?
* Added include to src/Generating/Trees.h
* Include added in ChunkGeneratorThread.h
* Moved rearranged includes in LineBlockTracer.cpp
* Re-arrange headers in ChunkInterface.cpp
* Included ChunkDef.h in Path.h
* Included ChunkDef.h in NBTChunkSerializer.h
* Rearranged included and added required includes to headers.
* Removed unnecessary included in StringUtils.h.
|
| |
|
|
|
| |
* Update fmt to 6.2.0
|
| |
|
| |
|
|
|
|
| |
Add check for number of empty lines between functions and fix the corresponding failures
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Smelting Exp
Smelting now gives experience
* Furnace.txt update
Exp rewards are entered in furnace.txt, Reward calculation is now done
is the furnaceentity class
* furnace.txt update
Changed alignment tabs to spaces
Included documentation of exp in recipe
* Updated StringToFloat
changed strtod to strtof
* Explicit Float to Int
* Reworked Smelting Rewards
* No C casts
-Adds new function to the api
-Sets reward counter to 0 in furnace constructor
* Style and exp lock removed
-Fixed style mistakes accoring to PR notes
-XP isn't locked to a single player anymore
* No Smelter API
-Removed SetLastSmelter and GetLastSmelter
-Fixed comments
-Fixed log reward amounts
|
|
|
|
|
|
|
| |
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
|
|
|
|
|
|
|
|
| |
* Replace cItem::m_Lore with AStringVector
* Reword deprecation warning
* Fix lua bindings
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Ref.: #1392
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
StrToLower() returns a modified copy of the string, InPlaceLowercase() modifies the string in-place.
|
| |
|
|
|
|
| |
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
|
|\
| |
| |
| |
| | |
Conflicts:
src/Chunk.h
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This time using va_copy() on platforms that have it and simple assignment on platforms that don't.
|
|
|
|
| |
This seems to be the only reasonable C++03-only solution.
|
| |
|
|
|
|
| |
This should fix #420.
|
|
|
|
|
| |
Conflicts:
GNUmakefile
|
|
|