]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a faster variant of functions.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 9 Mar 2010 00:37:36 +0000 (00:37 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 9 Mar 2010 00:37:36 +0000 (00:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@20758 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/index_set.h

index 2ca1086285a6e1e17d1707c7b82bef9f2859f816..c5dad3458b1ce2b71f25b2d1896b5a70e730d501 100644 (file)
@@ -167,7 +167,7 @@ class IndexSet
                                      * consideration.
                                      */
     unsigned int n_intervals () const;
-    
+
                                     /**
                                      * Compress the internal
                                      * representation by merging
@@ -231,7 +231,7 @@ class IndexSet
                                      */
     template <class STREAM>
     void print(STREAM &out) const;
-    
+
 #ifdef DEAL_II_USE_TRILINOS
                                     /**
                                      * Given an MPI communicator,
@@ -330,12 +330,12 @@ class IndexSet
                     &&
                     (range_1.end < range_2.end)));
          }
-       
+
        static bool end_compare(const IndexSet::Range & x, const IndexSet::Range & y)
          {
            return x.end < y.end;
          }
-       
+
        friend
        inline bool operator== (const Range &range_1,
                                const Range &range_2)
@@ -427,7 +427,7 @@ inline
 void
 IndexSet::set_size (const unsigned int sz)
 {
-  Assert (ranges.size() == 0,
+  Assert (ranges.empty(),
          ExcMessage ("This function can only be called if the current "
                      "object does not yet contain any elements."));
   index_space_size = sz;
@@ -532,7 +532,7 @@ inline
 bool
 IndexSet::is_element (const unsigned int index) const
 {
-  if (ranges.size() > 0)
+  if (ranges.empty() == false)
     {
       compress ();
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.