summaryrefslogtreecommitdiffstats
path: root/src/Enchantments.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-05-15 00:15:35 +0200
committerGitHub <noreply@github.com>2020-05-15 00:15:35 +0200
commit13144a08e496b89b34093ffd3d810d3442df3c44 (patch)
tree406d79e17b69560564fdb0972a3c50542a3a96c6 /src/Enchantments.cpp
parentGenerate "LuaState_Typedefs.inc" before running clang-tidy (diff)
downloadcuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.gz
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.bz2
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.lz
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.xz
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.zst
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.zip
Diffstat (limited to '')
-rw-r--r--src/Enchantments.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp
index 53a8212e8..52ebc5e3e 100644
--- a/src/Enchantments.cpp
+++ b/src/Enchantments.cpp
@@ -304,7 +304,7 @@ bool cEnchantments::CanAddEnchantment(int a_EnchantmentID) const
// {enchInfinity, enchMending}
};
- for (auto excl: IncompatibleEnchantments)
+ for (const auto & excl: IncompatibleEnchantments)
{
if (excl.count(a_EnchantmentID) != 0)
{
@@ -1112,7 +1112,9 @@ void cEnchantments::RemoveEnchantmentWeightFromVector(cWeightedEnchantments & a_
-void cEnchantments::CheckEnchantmentConflictsFromVector(cWeightedEnchantments & a_Enchantments, cEnchantments a_FirstEnchantment)
+void cEnchantments::CheckEnchantmentConflictsFromVector(
+ cWeightedEnchantments & a_Enchantments, const cEnchantments & a_FirstEnchantment
+)
{
if (a_FirstEnchantment.GetLevel(cEnchantments::enchProtection) > 0)
{