| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The craft definition handling code that collects the names of
the craftable nodes suffers from vector reallocation
performance hits, slowing down instances with lots of
crafting recipes (VanessaE's DreamBuilder and most public
server some to my mind when thinking about this). As in each
instance the size of the resulting vector is already known,
add a reserve() call before the offending loops to allocate
the needed chunk of memory within the result vector in one
go, getting rid of the overhead.
|
| |
|
| |
|
|
|
| |
Last modernization fixes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Modernize src/c* src/d* and src/e* files
* default operator
* redundant init
* delete default constructors on CraftDefinition childs (never used)
* fix some missing init values
* const ref fix reported by clang-tidy
* ranged-based for loops
* simple conditions & returns
* empty stl function instead of size
* emplace_back stl function instead of push_back + construct temp obj
* auto for some iterators
* code style fixes
* c++ stl headers instead of C stl headers (stdio.h -> cstdio)
|
| |
|
|
|
|
|
| |
Modifications by est31: grammar fixes in doc + error messages and
a little style fix, no functional change.
|
|
|
|
|
|
|
|
|
|
|
| |
Changes:
* Fix indentation.
* Pass strings by const reference.
* Merge Strfnd and WStrfnd into one class instead of copying them.
* Remove trailing spaces.
* Fix variable names.
* Move to util.
* Other miscellaneous style fixes.
|
| |
|
| |
|
| |
|
|
|
|
| |
Use numbers instead of iterators to traverse various vectors.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It isn't needed anymore, sending ICraftDefManager over the network has been obsoleted
by protocol version 7.
|
|
|
|
|
| |
Fix style, refactor assert, use '"' instead of "\"",
replace code duplicating craftGetItemName, rename iterators.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This greatly increases crafting performance, especially in worlds with many mods.
Approved by @kwolekr.
Introduces a hash-type-layered fall-through mechanism, where every layer specifies one hash algorithm,
and the "deeper the fall", the more collisions to expect for the algorithm. One Craft definition
only resides at one layer, which improves speed for lower layers (and a complete fail), due to most
craft definitions residing at high layers.
Due to the fall-through design, the undocumented behaviour that later craft recipes
override older ones had to be weaked up a bit, but craft recipes with the same hash and layer
will still override.
|
|
|
|
| |
Signed off by: ShadowNinja, kwolekr
|
| |
|
|
|
|
| |
matching
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
GPLv2/later, by agreement of major contributors
|
| |
|
|
|
|
| |
http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
|
| |
|
| |
|
|
|