]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Initialize a variable to avoid a warning from gcc3.5.
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Jun 2004 19:07:15 +0000 (19:07 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Jun 2004 19:07:15 +0000 (19:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@9413 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_tools.cc

index 642405234ad28d62dacc510465873bf6ba02f7a6..ac99cd730c1a3430819f5d49a4f258b5b3304583 100644 (file)
@@ -2005,26 +2005,30 @@ DoFTools::compute_intergrid_constraints (const DoFHandler<dim>              &coa
        Assert (col < n_parameters_on_fine_grid, ExcInternalError());
        
        unsigned int first_used_row=0;
-       if (true)
-         {
-           std::map<unsigned int,float>::const_iterator col_entry;
-           for (; first_used_row<n_coarse_dofs; ++first_used_row)
-             {
-               col_entry = weights[first_used_row].find(col);
-               if (col_entry != weights[first_used_row].end())
-                 break;
-             };
+
+       {
+         Assert (weights.size() > 0, ExcInternalError());
+         std::map<unsigned int,float>::const_iterator
+           col_entry = weights[0].end();
+         for (; first_used_row<n_coarse_dofs; ++first_used_row)
+           {
+             col_entry = weights[first_used_row].find(col);
+             if (col_entry != weights[first_used_row].end())
+               break;
+           }
+
+         Assert (col_entry != weights[0].end(), ExcInternalError());
            
-           if ((col_entry->second == 1) &&
-               (representants[first_used_row] == static_cast<int>(global_dof)))
-                                              // dof unconstrained or
-                                              // constrained to itself
-                                              // (in case this cell is
-                                              // mapped to itself, rather
-                                              // than to children of
-                                              // itself)
-             continue;
-         };
+         if ((col_entry->second == 1) &&
+             (representants[first_used_row] == static_cast<int>(global_dof)))
+                                            // dof unconstrained or
+                                            // constrained to itself
+                                            // (in case this cell is
+                                            // mapped to itself, rather
+                                            // than to children of
+                                            // itself)
+           continue;
+       }
 
 
                                         // otherwise enter all constraints

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.