summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-22 20:46:26 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 10:14:03 +0900
commit03af836332b6b80975a402c865542fccf2f56de1 (patch)
tree0cd428e5a650bccb071a34edc747d4bc1e7821f3 /src/lib/eolian_cxx
parent4fdc5fd0b20bf9c56248858fb31aa02cad306e77 (diff)
cxx: Use set for forward classes
This avoids duplication. Not very important as there are FWD_GUARD macros anyway.
Diffstat (limited to 'src/lib/eolian_cxx')
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index f7b12af578..739390ddc6 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -719,6 +719,12 @@ struct klass_def
719 { 719 {
720 return !(lhs == rhs); 720 return !(lhs == rhs);
721 } 721 }
722 friend inline bool operator<(klass_def const& lhs, klass_def const& rhs)
723 {
724 return lhs.eolian_name < rhs.eolian_name
725 || lhs.cxx_name < rhs.cxx_name
726 || lhs.namespaces < rhs.namespaces;
727 }
722 728
723 klass_def(std::string eolian_name, std::string cxx_name, std::string filename 729 klass_def(std::string eolian_name, std::string cxx_name, std::string filename
724 , std::vector<std::string> namespaces 730 , std::vector<std::string> namespaces