From d1c95742ddd83899bb35051de9d731d38aba80a4 Mon Sep 17 00:00:00 2001 From: E14 <1640391+E14@users.noreply.github.com> Date: Sun, 22 Sep 2019 22:57:54 +0200 Subject: Add ProtocolBlockTypePalette (#4391) --- src/BlockState.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'src/BlockState.cpp') diff --git a/src/BlockState.cpp b/src/BlockState.cpp index 4e2607bd3..8ee87c50f 100644 --- a/src/BlockState.cpp +++ b/src/BlockState.cpp @@ -83,6 +83,52 @@ BlockState::BlockState(const BlockState & aCopyFrom, const std::mapfirst.compare(itOther->first); + if (cmp != 0) + { + return (cmp < 0); + } + } + { + const auto cmp = itA->second.compare(itOther->second); + if (cmp != 0) + { + return (cmp < 0); + } + } + + ++itA; + ++itOther; + } + + return false; +} + + + + + bool BlockState::operator ==(const BlockState & aOther) const { // Fast-fail if the checksums differ or differrent counts: -- cgit v1.2.3