eolian-cxx: Fixed assert which was a tautology
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Fri, 9 Oct 2015 16:48:17 +0000 (13:48 -0300)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Fri, 9 Oct 2015 16:51:20 +0000 (13:51 -0300)
Fixed the assert to the correct check

@fix CID 1316018

src/lib/eolian_cxx/eo_validate.hh

index 0b6f5cf..8ffa7dc 100644 (file)
@@ -71,10 +71,10 @@ eo_class_validate(const eo_class& cls)
 {
    // class name and type
    _validate(cls.name, cls);
-   assert(cls.type != eo_class::regular_ ||
-          cls.type != eo_class::regular_noninst_ ||
-          cls.type != eo_class::interface_ ||
-          cls.type != eo_class::mixin_);
+   assert(cls.type == eo_class::regular_ ||
+          cls.type == eo_class::regular_noninst_ ||
+          cls.type == eo_class::interface_ ||
+          cls.type == eo_class::mixin_);
 
    // constructors
    for (auto it = cls.constructors.cbegin(), last = cls.constructors.cend();