Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /trunk/contrib/brl/bbas/volm/volm_spherical_region.cxx [r36647] .. [r36648] Maximize Restore

  Switch to side-by-side view

--- a/trunk/contrib/brl/bbas/volm/volm_spherical_region.cxx
+++ b/trunk/contrib/brl/bbas/volm/volm_spherical_region.cxx
@@ -3,7 +3,7 @@
 #define stringify( name ) # name
 bool volm_spherical_region::is_attribute(spherical_region_attributes att)
 {
-    if(attributes_.find(att)!=attributes_.end())
+    if (attributes_.find(att)!=attributes_.end())
         return true;
     else
         return false;
@@ -11,7 +11,7 @@
 
 bool volm_spherical_region::attribute_value(spherical_region_attributes att, unsigned char & value)
 {
-    if(this->is_attribute(att))
+    if (this->is_attribute(att))
     {
         value = attributes_[att];
         return true;
@@ -22,22 +22,23 @@
         return false;
     }
 }
-void volm_spherical_region::print(vcl_ostream& os) 
+
+void volm_spherical_region::print(vcl_ostream& os)
 {
-    os<<"Box "<<box_<<" ";
+    os<<"Box "<<box_<<' ';
     vcl_map<spherical_region_attributes,unsigned char>::iterator iter = attributes_.begin();
-    for(;iter!= attributes_.end();iter++)
+    for (;iter!= attributes_.end();iter++)
     {
-        os<<"("<<iter->first<<", "<<(int)iter->second<<") " ;
+        os<<'('<<iter->first<<", "<<(int)iter->second<<") " ;
     }
-    os<<"\n";
+    os<<'\n';
 }
 
 vcl_vector<spherical_region_attributes> volm_spherical_region::attribute_types()
 {
     vcl_vector<spherical_region_attributes> attributes;
     vcl_map<spherical_region_attributes,unsigned char>::iterator iter = attributes_.begin();
-    for(;iter!= attributes_.end();iter++)
+    for (;iter!= attributes_.end();iter++)
     {
         attributes.push_back(iter->first);
     }
@@ -51,10 +52,10 @@
 }
 
 
-vcl_vector<unsigned int> 
+vcl_vector<unsigned int>
 volm_spherical_regions_layer::attributed_regions(spherical_region_attributes att)
 {
-    if( attributed_regions_.find(att)!= attributed_regions_.end())
+    if ( attributed_regions_.find(att)!= attributed_regions_.end())
         return attributed_regions_[att];
     else // return an empty vector
     {
@@ -62,12 +63,12 @@
         return ids;
     }
 }
+
 void volm_spherical_regions_layer::update_attribute_map(int id)
 {
     vcl_vector<spherical_region_attributes> attribute_types = regions_[id].attribute_types();
-    for(unsigned i =0; i < attribute_types.size(); i++)
+    for (unsigned i =0; i < attribute_types.size(); i++)
     {
         attributed_regions_[attribute_types[i]].push_back(id);
     }
-
-}+}