| 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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Avoid inefficient AString -> c_str() -> AString round trip
* Avoid redundant string init expressions
* Avoid unnecessary return, continue, etc.
* Add .clang-format to help with clang-tidy fix-its
* Avoid unnecessary passing by value
* Avoid unnecessary local copying
* Avoid copying in range-for loops
* Avoid over-complicated boolean expressions
* Some violations missed by my local clang-tidy
* Allow unnecessary continue statements
* Add brackets
* Another expression missed locally
* Move BindingsProcessor call into clang-tidy.sh and add space
* Fix pushd not found error
* Different grouping of CheckBlockInteractionRate
|
|
|
| |
* Update fmt to 6.2.0
|
| |
|
| |
|
|
|
|
| |
Add check for number of empty lines between functions and fix the corresponding failures
|
|
|
|
|
|
|
| |
* Change reinterpret_cast -> static_cast wherever possible
* Remove more unnecessary `const_cast`s.
reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
* Fixed a recursive loop where the replacement would again be searched for the needle.
* Skip if the needle is empty. Find(needle) always matches if needle is empty.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The function would crash when given a string that started with the delimiter.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Instead of preventing duplicates it was allowing only duplicates.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Ref.: #1392
|
|
|
|
| |
StrToLower() returns a modified copy of the string, InPlaceLowercase() modifies the string in-place.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
|
|
|
|
| |
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The functions would fail on bytes that were above 127.
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
Ref.: #541.
|
|
|
|
| |
This caused a failure in server favicons.
|
| |
|
| |
|
| |
|
|
|
|
| |
This should fix #420.
|
|
|
|
|
| |
Conflicts:
GNUmakefile
|
|
|