From 59728381b945570090a8d101ec6128492c82ab7e Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sat, 6 Oct 2012 14:59:48 +0200 Subject: [PATCH] strbuffer: fix Property::operator< --- src/strbuffer.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/strbuffer.h b/src/strbuffer.h index b89ad63c..32372b46 100644 --- a/src/strbuffer.h +++ b/src/strbuffer.h @@ -48,6 +48,19 @@ template class BasicBuffer { if (m_position != rhs.m_position) return m_position < rhs.m_position; + if (m_type != rhs.m_type) + return m_type < rhs.m_type; + switch (m_type) + { + case Type::Color: + if (m_color != rhs.m_color) + return m_color < rhs.m_color; + break; + case Type::Format: + if (m_format != rhs.m_format) + return m_format < rhs.m_format; + break; + } return m_id < rhs.m_id; }