Author: miriam
Date: 2008-08-23 04:05:12 +0000 (Sat, 23 Aug 2008)
New Revision: 7963

Modified:
   software/gofind/taghandler.cpp
   software/gofind/taghandler.h
Log:
Moved non inlined functions of FilterTagHandler::Result from taghandler.h to 
taghandler.cpp



Modified: software/gofind/taghandler.cpp
===================================================================
--- software/gofind/taghandler.cpp      2008-08-22 16:08:24 UTC (rev 7962)
+++ software/gofind/taghandler.cpp      2008-08-23 04:05:12 UTC (rev 7963)
@@ -21,6 +21,46 @@
 
 #include <iostream>
 
+bool FilterTagHandler::Result::CompareAny(const Result &red) const
+{
+       unsigned int min_size = size;
+       if (min_size > red.size) min_size = red.size;
+       for (unsigned int i=0; i<min_size; i++)
+               if ((data[i] & red.data[i]) != 0) return true;
+       return false;
+}
+
+bool FilterTagHandler::Result::CompareAll(const Result &green) const
+{
+       unsigned int min_size = size;
+       if (min_size > green.size) min_size = green.size;
+       for (unsigned int i=0; i<min_size; i++)
+               if ((data[i] & green.data[i]) != green.data[i]) return false;
+       if (size >= green.size) return true;
+       for (unsigned int j=size; j<green.size; j++)
+               if (green.data[j] != 0) return false;
+       return true;
+}
+
+void FilterTagHandler::Result::Print(std::ostream &out) const
+{
+       unsigned int tmp_position = 0;
+       unsigned int tmp_index = 0;
+       for (unsigned int i=0; i<size; i++)
+       {
+               unsigned int tmp_flag = 1;
+               unsigned int tmp_data = data[tmp_index];
+               while (tmp_flag) {
+                       out << ( tmp_data & tmp_flag ? "*" : "-" ) ;
+                       tmp_flag = tmp_flag << 1;
+                       tmp_position++;
+                       if (tmp_position % 8 == 0) out << " " ;
+               }
+               tmp_index++;
+               out << "  " ;
+       }
+}
+
 FilterTagHandler::FilterTagHandler() : current_position(0), current_flag(1)
 {
 }

Modified: software/gofind/taghandler.h
===================================================================
--- software/gofind/taghandler.h        2008-08-22 16:08:24 UTC (rev 7962)
+++ software/gofind/taghandler.h        2008-08-23 04:05:12 UTC (rev 7963)
@@ -78,46 +78,10 @@
                        return false;
                }
 
-               bool CompareAny(const Result &red)
-               {
-                       unsigned int min_size = size;
-                       if (min_size > red.size) min_size = red.size;
-                       for (unsigned int i=0; i<min_size; i++)
-                               if ((data[i] & red.data[i]) != 0) return true;
-                       return false;
-               }
+               bool CompareAny(const Result &red) const;
+               bool CompareAll(const Result &green) const;
+               void Print(std::ostream &out) const;
 
-               bool CompareAll(const Result &green)
-               {
-                       unsigned int min_size = size;
-                       if (min_size > green.size) min_size = green.size;
-                       for (unsigned int i=0; i<min_size; i++)
-                               if ((data[i] & green.data[i]) != green.data[i]) 
return false;
-                       if (size >= green.size) return true;
-                       for (unsigned int j=size; j<green.size; j++)
-                               if (green.data[j] != 0) return false;
-                       return true;
-               }
-
-               void Print(std::ostream &out) const
-               {
-                       unsigned int tmp_position = 0;
-                       unsigned int tmp_index = 0;
-                       for (unsigned int i=0; i<size; i++)
-                       {
-                               unsigned int tmp_flag = 1;
-                               unsigned int tmp_data = data[tmp_index];
-                               while (tmp_flag) {
-                                       out << ( tmp_data & tmp_flag ? "*" : 
"-" ) ;
-                                       tmp_flag = tmp_flag << 1;
-                                       tmp_position++;
-                                       if (tmp_position % 8 == 0) out << " " ;
-                               }
-                               tmp_index++;
-                               out << "  " ;
-                       }
-               }
-
        protected:
                void Size(unsigned int new_size)
                {


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to