Fixed initialization of static vars.
[platform/upstream/libzypp.git] / zypp / Locale.cc
index 8cb9302..e5d2300 100644 (file)
@@ -85,18 +85,13 @@ namespace zypp
   public:
     /** Offer default Impl. */
     static shared_ptr<Impl> nullimpl()
-    { if ( ! _nullimpl ) _nullimpl.reset( new Impl ); return _nullimpl; }
-
-  private:
-    /** Default Impl. */
-    static shared_ptr<Impl> _nullimpl;
+    {
+      static shared_ptr<Impl> _nullimpl( new Impl );
+      return _nullimpl;
+    }
   };
   ///////////////////////////////////////////////////////////////////
 
-  shared_ptr<Locale::Impl> Locale::Impl::_nullimpl;
-
-  ///////////////////////////////////////////////////////////////////
-
   /** \relates Locale::Impl Stream output */
   inline std::ostream & operator<<( std::ostream & str, const Locale::Impl & obj )
   {
@@ -109,8 +104,7 @@ namespace zypp
   //
   ///////////////////////////////////////////////////////////////////
 
-#warning NO STATIC VARIABLES
-//  const Locale Locale::noCode;
+  const Locale Locale::noCode;
 
   ///////////////////////////////////////////////////////////////////
   //