1
0
Fork 0
Commit Graph

65 Commits

Author SHA1 Message Date
Alexander Harkness 4b8952e438 Use more URL-Encoding when sending API requests. 2021-08-23 09:35:03 +01:00
Tiger Wang eeb63b8901
zlib -> libdeflate (#5085)
+ Use libdeflate
+ Use std::byte
* Fix passing temporary to string_view
+ Emulate make_unique_for_overwrite
2021-01-11 16:39:43 +00:00
Tiger Wang 330626ab22 Update submodules 2020-07-23 00:32:47 +01:00
Peter Bell 829f8d46f0 Update fmtlib to 7.0.0 2020-07-06 20:53:04 +01:00
peterbell10 13144a08e4
Enable some more clang-tidy linter checks (#4738)
* 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
2020-05-14 22:15:35 +00:00
peterbell10 57952505e5
Update fmt to 6.2.0 (#4718)
* Update fmt to 6.2.0
2020-05-05 22:52:14 +01:00
E14 83013d19ca GCC: Added pragma to ignore fallthrough warnings within Unicode Inc. code (#4392) 2019-09-13 15:56:56 +02:00
peterbell10 9dc1343bda
Ignore whitespace only lines in brewing and furnace recipes (#4332) 2019-06-11 13:39:44 +01:00
peterbell10 950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
peterbell10 a4dbb5c582
Prefer static_cast to reinterpret_cast (#4223)
* 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.
2018-05-02 08:50:36 +01:00
Alex Sweet a0896c63d7 Smelting Gives Experience (#4094)
* 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
2018-04-11 07:46:11 +01: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 b8dda388e0 Represent cItem::m_Lore as an AStringVector (#3882)
* Replace cItem::m_Lore with AStringVector

* Reword deprecation warning

* Fix lua bindings
2017-08-18 11:29:54 +01:00
peterbell10 55a5ffdf5c Remove stricmp macro in favour of NoCaseCompare 2017-07-21 14:41:51 +01:00
Marvin Kopf 974c054bc9 fix endless loop in StringReplace (#3658)
* 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.
2017-04-01 12:57:51 +01:00
Mattes D 72e401313b StringUtils: Dropped an unneeded copy in lower-/upper-casing. (#3512) 2017-02-13 19:56:34 +01:00
Mattes D b3b723b453 Refactored to put URL Encoding / Decoding in a single place. (#3491) 2016-12-25 18:29:21 +01:00
Tiger Wang 8c6d0b51c7 Use CMake's Android generators to crosscompile 2016-12-12 14:32:32 +00:00
Mattes D d2e8643607 Fixed type-casting-related warnings. 2016-08-24 22:26:53 +02:00
LogicParrot f405c8820e Fix unicode handling in StringUtils::TrimString 2016-02-16 16:58:27 +02:00
Alexander Harkness 8b851d5048 Added HTTPS links wherever they are supported. 2015-12-19 14:30:32 +00:00
tycho e1d5e5e165 Improved types of utf 16 strings 2015-10-02 17:26:53 +02:00
Mattes D 6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Mattes D b356419a07 StringUtils: Fixed StringSplitWithQuotes().
The function would crash when given a string that started with the delimiter.
2015-05-10 21:39:14 +02:00
flx5 936d56a711 Performance improvements for #1807 2015-03-12 20:16:12 +01:00
flx5 f6912bd01c Fixed coding conventions for Pull Request #1807 2015-03-11 20:02:11 +01:00
flx5 d8ab99e944 Fixed issue with quotes not appearing in pairs 2015-03-11 19:52:49 +01:00
flx5 76012ee090 Fixed some markup issues 2015-03-11 04:38:15 +01:00
flx5 451ab6860f Fixed some markup issues 2015-03-11 04:33:17 +01:00
flx5 d130696e95 Fixes #493 and #490 2015-03-11 04:14:17 +01:00
Mattes D 7cff25f0ff StringUtils: Fixed bad predicate in MergeStringVectors().
Instead of preventing duplicates it was allowing only duplicates.
2015-01-27 14:53:29 +01:00
Mattes D 40e231bc29 StringUtils: Added string vector manipulation. 2015-01-27 14:53:25 +01:00
Mattes D 9429cdcb53 Fixed warnings in StringUtils. 2015-01-21 20:39:34 +01:00
Mattes D e2a04f580a BasicStyle: Added missing braces to control statements. 2014-12-05 16:59:11 +01:00
Mattes D 44644ae025 Fixed reported parentheses around comparisons. 2014-12-05 12:58:47 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Tiger Wang 1f8ee70d55 Bug fix 2014-09-27 22:13:37 +01:00
madmaxoft 3406957f1b Initial BungeeCord support.
Ref.: #1392
2014-09-17 09:38:06 +02:00
madmaxoft 1fa210c7f9 Refactored case-conversion functions.
StrToLower() returns a modified copy of the string, InPlaceLowercase() modifies the string in-place.
2014-08-04 11:30:20 +02:00
madmaxoft 122344bb7a Rewritten string case manipulation to use std::transform. 2014-08-04 08:00:49 +02:00
madmaxoft b19874e6f2 Attempting a compilation fix for gcc / clang. 2014-08-03 22:19:43 +02:00
madmaxoft 08748bafe2 Code style: Fixed braces on separate lines. 2014-07-19 15:23:40 +02:00
madmaxoft 00c524519e Fixed style: spaces after commas. 2014-07-19 14:53:41 +02:00
madmaxoft 2423fbf2ef Normalized comments.
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.
2014-07-17 22:15:34 +02:00
madmaxoft 993fd14ddf Fixed basic whitespace problems.
Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
2014-07-17 16:33:09 +02:00
Mattes D fb58ef55be Fixed MSVC 64-bit build warnings. 2014-05-09 18:32:03 +02:00
madmaxoft 3590f97e00 Fixed CreateHexDump's format string. 2014-04-04 11:19:57 +02:00
madmaxoft e1f75ab6d0 Fixed CreateHexDump's signedness. 2014-04-04 10:42:17 +02:00
madmaxoft 5dee19648d More Clang warning fixes in the protocols. 2014-04-04 10:31:50 +02:00