1
0
Fork 0
Commit Graph

123 Commits

Author SHA1 Message Date
Mattes D 46398f4671 Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
Tiger Wang 3f712ca9cf Precompile unordered_map/set
+ Add inclusions to Globals.h
* Sort Globals.h
- Remove sys/stat.h from Globals.h
2020-07-19 19:58:53 +01:00
Tiger Wang 1c714312eb Remove unnecessary includes 2020-07-12 23:41:54 +01:00
Tiger Wang 9e8598fb1c
Upgrade to C++17 [CMake] (#4717)
* Make our CMake slightly less insane
2020-05-16 20:59:10 +01:00
Peter Bell 3189a3cbee Update logging code to reduce unnecessary string copying:
* Write into a single fmt::memory_buffer
* Use string_view instead of AString for listener callbacks
* Also collapsed vFLOG and vLOG functions into one per formatting type
2020-05-16 09:39:05 +01:00
peterbell10 154df6b09d
Cleanup unneeded globals (#4736) 2020-05-10 16:16:38 +00:00
Peter Bell 1123c95cf2 Enable C++17 in build 2020-05-09 20:37:16 +01:00
Mat c710f6a4ea
Remove old Android leftovers (#4722) 2020-05-07 22:14:00 +03:00
peterbell10 57952505e5
Update fmt to 6.2.0 (#4718)
* Update fmt to 6.2.0
2020-05-05 22:52:14 +01:00
Mattes D 01b8ed5295
Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change)
The BlockInfo.h file was removed from Globals.h (main change)
The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics)
The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor)
Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header.
That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified.
eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
2020-04-03 08:57:01 +02:00
Mattes D 74579fbadf
Improved testing framework. (#4376) 2019-08-26 21:38:34 +02:00
peterbell10 d3c1c626f5
Deal with covered switches consistently (#4161)
* Fixes a number of "<function>: not all control paths return a value" warnings on MSVC.

* Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults.

* Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
2018-02-04 23:07:12 +00:00
peterbell10 757231cc6e
Add the fmt library (#4065)
* 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.
2018-01-03 17:41:16 +00:00
peterbell10 e225b7f826 Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
LogicParrot 49c443896d Revert "Replace ItemCallbacks with lambdas (#3948)"
This reverts commit 496c337cdf.
2017-09-02 08:50:23 +01:00
peterbell10 496c337cdf Replace ItemCallbacks with lambdas (#3948) 2017-09-01 13:04:50 +02:00
peterbell10 96ce841417 Add TOLUA_EXPOSITION for readability 2017-08-28 14:36:23 +01:00
peterbell10 759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
peterbell10 8fbb9dbf53 cParsedNBT: Improved error reporting (#3876)
* cParsedNBT: Improved error reporting

* Fix typos
2017-07-30 17:55:19 +01:00
Tiger Wang eb4432bb62 Tentative fix for player-limit race condition (#3862)
* Attempts to fix #2257

Derived from d233e9843148313c71fbaba96ccff660e47b07b1

* Changed player count type to int

* Clarified certain actions
2017-07-28 17:54:40 +01:00
peterbell10 7c687b77ee Remove comment 2017-07-21 14:41:51 +01:00
peterbell10 502b726a7b Simplify SizeCheck 2017-07-21 14:41:51 +01:00
peterbell10 55a5ffdf5c Remove stricmp macro in favour of NoCaseCompare 2017-07-21 14:41:51 +01:00
peterbell10 5a5297974b Remove alignment macros 2017-07-21 14:41:51 +01:00
peterbell10 a56cfd1f42 Remove smart pointer macros 2017-07-21 14:41:51 +01:00
peterbell10 60dfaa0967 Allocate redstone component handlers upfront 2017-07-17 21:40:43 +02:00
Mattes D ea6660721b NetworkSingleton: Fixed a throw warning in VS2017. (#3792)
Also fixed the misleading name.
2017-06-22 21:10:41 +02:00
Mattes D b0f3336533 MSVC Debug builds: Added operator new redirection to provide more info. (#3781) 2017-06-19 11:09:16 +02:00
Mattes D 801084c38c LuaState: Fixed VS2017's throw warnings for destructors. (#3779) 2017-06-19 11:08:08 +02:00
Mattes D d1dee3c909 Fixed RasPi builds of unit tests.
On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled.
Enforced the assumption that ASSERT code is generated only in Debug builds.
2016-08-04 20:47:53 +02:00
Mattes D 96034810df Flush immediately after each line when running tests. 2016-06-18 13:12:11 +02:00
Mattes D 191140dd5e Removed old and wrong code from Globals.h. 2016-02-24 14:57:34 +01:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mattes D 1abf065953 MSVC: Reviewed warnings, disabled a useless one, re-enabled an old one. 2015-11-05 11:09:37 +01:00
Mattes D 82d9ac1e1c Namechange to Cuberite 2015-09-25 10:14:17 +02:00
tycho 3187dbf0aa Increase robustness of the logging subsystem 2015-09-15 16:19:49 +01:00
Mattes D 6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Tiger Wang 8656e149c8 Improved maps 2015-07-14 21:46:30 +01:00
Mattes D 8df31067d4 Externalized cPrefabPiecePool self-test. 2015-06-19 16:15:59 +02:00
Alexander Harkness 1e77f27191 Merge pull request #2144 from mc-server/comparators
Redstone improvements [SEE DESC]
2015-06-09 09:15:08 +01:00
Tiger Wang de5b1401f8 Comparators 2015-06-06 12:21:09 +01:00
Anthony Birkett 9dac390247 Daemon support on Linux.
Added null console log listener, avoid printf() when stdout is closed.
2015-06-05 15:47:47 +01:00
Cengiz Can c967698b2d Skip unknown cflag for Apple clang & remove cSemaphore 2015-06-04 11:48:56 +03:00
tycho c96849f431 Move make_unique into a namespace to avoid ADL issues
this prevents VS finding std::make_unique for constructors that take types from std
2015-05-16 10:47:04 +01:00
tycho b9efa02c80 Initial implementation of IniFile overloading 2015-05-16 10:46:51 +01:00
Mattes D c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Mattes D b1d4b3bb96 Unified cByteBuffer types.
cByteBuffer now reads and writes any of the [U]Int<N> types.
2015-03-21 13:00:20 +01:00
Mattes D 16636ff6e2 LuaAPI: Added client TLS support for TCP links. 2015-02-12 20:05:55 +01:00
Mattes D 014b96adb3 Exported cServerHandle and cNetwork:Listen to Lua.
Also added an example to the NetworkTest plugin.
2015-02-04 08:40:52 +01:00
Mattes D bef957ef14 Added newline to logged messages in the tests. 2015-01-22 20:12:43 +01:00