Commit Graph

24 Commits

Author SHA1 Message Date
sfan5 471e567657 Value copy / allocation optimizations mostly in server, SAO and serialize code 2020-05-27 21:58:40 +02:00
SmallJoker 839e935ba0 Network: Send IEEE floats (#7768) 2018-12-13 11:20:57 +01:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
Loïc Blot e2a6b7c8d2 serialize: use a temporary for SerializeException
Exception must always use temporary instead of global copied exception instances, it's not recommended and should have undefined issues
2017-08-21 16:07:39 +02:00
Loïc Blot 88b436e6a9 Code modernization: subfolders (#6283)
* Code modernization: subfolders

Modernize various code on subfolders client, network, script, threading, unittests, util

* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* C++ STL header style
* Make connection.cpp readable in a pointed place + typo
2017-08-19 22:23:47 +02:00
Vincent Glize 4a5e8ad343 C++11 cleanup on constructors (#6000)
* C++11 cleanup on constructors dir script
2017-06-19 23:54:58 +02:00
rubenwardy f2aa2c6a98 Add ItemStack key-value meta storage 2017-02-04 22:07:55 +00:00
kwolekr 6f95bb1ef3 Fix misc. MinGW and Valgrind warnings 2015-11-08 16:34:56 -05:00
kwolekr 1a5b4b38f3 Add BufReader and vector-based serialization methods 2015-10-15 01:31:31 -04:00
kwolekr bf991bde45 Clean up util/serialization.{cpp,h} and add unit tests 2015-08-01 19:24:46 -04:00
kwolekr 515e7028ac Increase limit of serialized long strings 2015-07-14 03:22:16 -04:00
kwolekr 6f07f79c2f Add more robust error checking to deSerialize*String routines
Add serializeHexString()
Clean up util/serialize.cpp
2015-07-13 22:38:01 -04:00
Craig Robbins ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Rafael Reilova f7d65091f8 serialize.h: use machine native byte swapping if available, fall-back to previous generic method if not (supported for GCC using endian.h, detection done in cmake) write/readARGB8() - just write 32-bit color in one op, instead of 4 1-byte ops cleanup: removed unneeded buffer init for some serialize-out functions use a #define for the fixed point factor in read/writeF1000()
nodemetadata.cpp, nodetimer.cpp
	optimzation: simpler deserialize node position method

staticobject.cpp:
	cleanup: use util/serialize.h inlines instead of its own de/serialization

serialize.cpp:
	minor optimization/cleanup: avoid generation of unneeded string temporary

CMakeLists.txt, cmake_config.h.in: detection of endian.h

config.h: added HAVE_ENDIAN_H

Commits due to feedback squashed

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-21 22:33:48 +10:00
ShadowNinja 5fefc4bbf6 Fix serializing of signed numbers in serializeStructToString 2014-03-21 05:22:21 -04:00
ShadowNinja 23be6450a1 Make serializeStructToString use an ostringstream 2014-03-15 15:13:02 -04:00
ShadowNinja d753d352f1 Revert "Use fixed-width format specifiers in serializeStructToString"
This reverts commit 875f1327a4.
Fixed width format specifiers are only officially availale in C99 and C++11.
2014-03-14 12:13:30 -04:00
ShadowNinja 875f1327a4 Use fixed-width format specifiers in serializeStructToString 2014-03-13 17:30:15 -04:00
ShadowNinja 18577f2527 Replace usage of long long with u64/s64 2014-03-12 19:37:19 -04:00
kwolekr 3570f3e396 Add minetest.set_noiseparam_defaults() Lua API 2014-02-15 19:13:14 -05:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
Sfan5 6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola 1bc37d576c Initially split utility.h to multiple files in util/ 2012-06-17 01:29:13 +03:00