Code

Warning cleanup
authorjoncruz <joncruz@users.sourceforge.net>
Sun, 3 May 2009 05:16:27 +0000 (05:16 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Sun, 3 May 2009 05:16:27 +0000 (05:16 +0000)
src/display/nr-filter-gaussian.cpp
src/extension/init.cpp

index 90220d296cfcd269d1e50700bfd14e24bf268cf3..d80782d2009bb7687a11ac811f02558feeee1e7a 100644 (file)
@@ -585,13 +585,12 @@ int FilterGaussian::render(FilterSlot &slot, FilterUnits const &units)
     Geom::Matrix trans = units.get_matrix_primitiveunits2pb();
 
     // Some common constants
-    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
     int const width_org = in->area.x1-in->area.x0, height_org = in->area.y1-in->area.y0;
     double const deviation_x_org = _deviation_x * trans.expansionX();
     double const deviation_y_org = _deviation_y * trans.expansionY();
     int const PC = NR_PIXBLOCK_BPP(in);
 #if HAVE_OPENMP
-    int const NTHREADS = std::max(1,std::min(8,prefs->getInt("/options/threading/numthreads",omp_get_num_procs())));
+    int const NTHREADS = std::max(1,std::min(8, Inkscape::Preferences::get()->getInt("/options/threading/numthreads", omp_get_num_procs())));
 #else
     int const NTHREADS = 1;
 #endif // HAVE_OPENMP
index 0dba9df8fa8724c3a975b98630ccfe2cb5d4e312..84cc45de965fedb98592b528521cd940646d0d6d 100644 (file)
@@ -120,8 +120,7 @@ static void
 update_pref(Glib::ustring const &pref_path,
             gchar const *pref_default) // , GSList *extension_family)
 {
-    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-    Glib::ustring pref = prefs->getString(pref_path);
+    Glib::ustring pref = Inkscape::Preferences::get()->getString(pref_path);
     /*
     gboolean missing=TRUE;
     for (GSList *list = extension_family; list; list = g_slist_next(list)) {
@@ -134,7 +133,7 @@ update_pref(Glib::ustring const &pref_path,
     }
     */
     if (!Inkscape::Extension::db.get( pref.data() ) /*missing*/) {
-        prefs->setString(pref_path, pref_default);
+        Inkscape::Preferences::get()->setString(pref_path, pref_default);
     }
 }
 
@@ -148,8 +147,6 @@ update_pref(Glib::ustring const &pref_path,
 void
 init()
 {
-    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-    
     /* TODO: Change to Internal */
     Internal::Svg::init();
     Internal::Svgz::init();