Kaydet (Commit) d73fc13a authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: rhbz#855541 ensure PropertyNameSupplier singleton ctor is threadsafe

nothing really to do with odd multithreaded run_exit_handlers bug, just tidied
it up in passing

Change-Id: I9e56a21f92e5f89bbcb4413bb7cae44c48affb17
üst dc44bd0e
......@@ -16,6 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <rtl/instance.hxx>
#include <rtl/ustring.hxx>
#include "PropertyIds.hxx"
#include <map>
......@@ -326,10 +327,15 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
}
return aIt->second;
}
namespace
{
class thePropertyNameSupplier : public rtl::Static<PropertyNameSupplier, PropertyNameSupplier> {};
}
PropertyNameSupplier& PropertyNameSupplier::GetPropertyNameSupplier()
{
static PropertyNameSupplier aNameSupplier;
return aNameSupplier;
return thePropertyNameSupplier::get();
}
} //namespace dmapper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment