[pan2/testing: 210/279] fixed win32 bug in rules-info and rules-filter



commit 8e43cc5bf419d2d5694414268bdb40f3d2dbb4ba
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date:   Tue Sep 27 14:44:03 2011 +0200

    fixed win32 bug in rules-info and rules-filter

 pan/data-impl/rules-filter.cc  |    6 +++---
 pan/usenet-utils/rules-info.cc |   16 ++++++++--------
 pan/usenet-utils/rules-info.h  |   29 +++++++++++++----------------
 3 files changed, 24 insertions(+), 27 deletions(-)
---
diff --git a/pan/data-impl/rules-filter.cc b/pan/data-impl/rules-filter.cc
index 3d9db1d..60a6fdc 100644
--- a/pan/data-impl/rules-filter.cc
+++ b/pan/data-impl/rules-filter.cc
@@ -60,13 +60,13 @@ RulesFilter :: test_article ( Data        & data,
 
   switch (rules._type)
   {
-    case RulesInfo::AGGREGATE_AND:
+    case RulesInfo::AGGREGATE__AND:
       pass = true;
       foreach (RulesInfo::aggregates_t, rules._aggregates, it)
         test_article (data, *it, group, article);
       break;
 
-    case RulesInfo::AGGREGATE_OR:
+    case RulesInfo::AGGREGATE__OR:
       if (rules._aggregates.empty())
         pass = true;
       else {
@@ -96,7 +96,7 @@ RulesFilter :: test_article ( Data        & data,
         _downloaded.insert (&article);
       break;
 
-    case RulesInfo::DELETE:
+    case RulesInfo::DELETE_ARTICLE:
       if (pass)
          _delete.insert (&article);
       break;
diff --git a/pan/usenet-utils/rules-info.cc b/pan/usenet-utils/rules-info.cc
index 6580814..68b7319 100644
--- a/pan/usenet-utils/rules-info.cc
+++ b/pan/usenet-utils/rules-info.cc
@@ -38,7 +38,7 @@ using namespace pan;
 void
 RulesInfo :: clear ()
 {
-  _type = RulesInfo::TYPE_ERR;
+  _type = RulesInfo::TYPE__ERR;
   _aggregates.clear ();
   _lb = _hb = 0;
   _ge = 0;
@@ -46,20 +46,20 @@ RulesInfo :: clear ()
 }
 
 void
-RulesInfo :: set_type_is (Type type) {
+RulesInfo :: set_type_is (RulesType type) {
    clear ();
    _type = type;
 }
 
 void
-RulesInfo :: set_type_ge (Type type, unsigned long ge) {
+RulesInfo :: set_type_ge (RulesType type, unsigned long ge) {
   clear ();
   _type = type;
   _ge = ge;
 }
 
 void
-RulesInfo :: set_type_le (Type type, unsigned long le) {
+RulesInfo :: set_type_le (RulesType type, unsigned long le) {
   clear ();
   _type = type;
   _negate = true;
@@ -67,7 +67,7 @@ RulesInfo :: set_type_le (Type type, unsigned long le) {
 }
 
 void
-RulesInfo :: set_type_bounds (Type type, int low, int high)
+RulesInfo :: set_type_bounds (RulesType type, int low, int high)
 {
   clear ();
   _type = type;
@@ -77,12 +77,12 @@ RulesInfo :: set_type_bounds (Type type, int low, int high)
 void
 RulesInfo :: set_type_aggregate_and () {
    clear ();
-   _type = AGGREGATE_AND;
+   _type = AGGREGATE__AND;
 }
 void
 RulesInfo :: set_type_aggregate_or () {
    clear ();
-   _type = AGGREGATE_OR;
+   _type = AGGREGATE__OR;
 }
 
 /****
@@ -111,5 +111,5 @@ RulesInfo :: set_type_dl_b  (int lb, int hb)
 void
 RulesInfo :: set_type_delete_b  (int lb, int hb)
 {
-   set_type_bounds (DELETE, lb, hb);
+   set_type_bounds (DELETE_ARTICLE, lb, hb);
 }
diff --git a/pan/usenet-utils/rules-info.h b/pan/usenet-utils/rules-info.h
index ebc71d8..54cd15d 100644
--- a/pan/usenet-utils/rules-info.h
+++ b/pan/usenet-utils/rules-info.h
@@ -36,26 +36,23 @@ namespace pan
     public:
 
       /** The different type of filters we support. */
-      enum Type {
-        TYPE_ERR,
-        AGGREGATE_AND,
-        AGGREGATE_OR,
+      enum RulesType {
+        TYPE__ERR,
+        AGGREGATE__AND,
+        AGGREGATE__OR,
         MARK_READ,
         AUTOCACHE,
         AUTODOWNLOAD,
-        DELETE
+        DELETE_ARTICLE
       };
 
-    public:
-      bool empty() const { return _type == TYPE_ERR; }
+      /** Defines what type of filter this is. */
+      RulesType _type;
+
+      bool empty() const { return _type == TYPE__ERR; }
       RulesInfo () { clear(); }
       virtual ~RulesInfo () { }
 
-    public:
-
-      /** Defines what type of filter this is. */
-      Type _type;
-
       /** Convenience typedef. */
       typedef std::deque<RulesInfo> aggregates_t;
 
@@ -67,10 +64,10 @@ namespace pan
       bool _negate;
 
     private:
-      void set_type_is (Type type);
-      void set_type_le (Type type, unsigned long le);
-      void set_type_ge (Type type, unsigned long ge);
-      void set_type_bounds (Type type, int low, int high);
+      void set_type_is (RulesType type);
+      void set_type_le (RulesType type, unsigned long le);
+      void set_type_ge (RulesType type, unsigned long ge);
+      void set_type_bounds (RulesType type, int low, int high);
 
 
     public:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]