summaryrefslogtreecommitdiff
path: root/comphelper/source/misc
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc')
-rw-r--r--comphelper/source/misc/anycompare.cxx3
-rw-r--r--comphelper/source/misc/asyncnotification.cxx11
-rw-r--r--comphelper/source/misc/docpasswordrequest.cxx2
-rw-r--r--comphelper/source/misc/random.cxx4
-rw-r--r--comphelper/source/misc/threadpool.cxx4
5 files changed, 24 insertions, 0 deletions
diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx
index f4d2a8b5d260..bb77544c957e 100644
--- a/comphelper/source/misc/anycompare.cxx
+++ b/comphelper/source/misc/anycompare.cxx
@@ -49,6 +49,8 @@ namespace comphelper
using ::com::sun::star::util::Time;
using ::com::sun::star::util::DateTime;
+ namespace {
+
class DatePredicateLess : public IKeyPredicateLess
{
public:
@@ -158,6 +160,7 @@ namespace comphelper
}
};
+ }
std::unique_ptr< IKeyPredicateLess > getStandardLessPredicate( Type const & i_type, Reference< XCollator > const & i_collator )
{
diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx
index c73bd22cf163..a360b7207fe4 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -38,6 +38,8 @@ namespace comphelper
{
}
+ namespace {
+
struct ProcessableEvent
{
AnyEventRef aEvent;
@@ -54,9 +56,11 @@ namespace comphelper
}
};
+ }
typedef std::deque< ProcessableEvent > EventQueue;
+ namespace {
struct EqualProcessor
{
@@ -69,6 +73,8 @@ namespace comphelper
}
};
+ }
+
struct EventNotifierImpl
{
::osl::Mutex aMutex;
@@ -178,7 +184,12 @@ namespace comphelper
return AsyncEventNotifierBase::terminate();
}
+ namespace {
+
struct theNotifiersMutex : public rtl::Static<osl::Mutex, theNotifiersMutex> {};
+
+ }
+
static std::vector<std::weak_ptr<AsyncEventNotifierAutoJoin>> g_Notifiers;
void JoinAsyncEventNotifiers()
diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx
index e1092df36f0b..56644d4d6e59 100644
--- a/comphelper/source/misc/docpasswordrequest.cxx
+++ b/comphelper/source/misc/docpasswordrequest.cxx
@@ -41,6 +41,7 @@ using ::com::sun::star::task::XInteractionPassword2;
namespace comphelper {
+namespace {
class AbortContinuation : public ::cppu::WeakImplHelper< XInteractionAbort >
{
@@ -48,6 +49,7 @@ public:
virtual void SAL_CALL select() override {}
};
+}
class PasswordContinuation : public ::cppu::WeakImplHelper< XInteractionPassword2 >
{
diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx
index ddc970efe321..f001b06195d6 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -38,6 +38,8 @@ namespace rng
// http://en.wikipedia.org/wiki/Mersenne_twister
#define STD_RNG_ALGO std::mt19937
+namespace {
+
struct RandomNumberGenerator
{
std::mutex mutex;
@@ -77,6 +79,8 @@ struct RandomNumberGenerator
class theRandomNumberGenerator : public rtl::Static<RandomNumberGenerator, theRandomNumberGenerator> {};
+}
+
// uniform ints [a,b] distribution
int uniform_int_distribution(int a, int b)
{
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index 95b6f2dff091..9b1991b7f3a1 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -105,6 +105,8 @@ ThreadPool::~ThreadPool()
assert(maTasks.empty());
}
+namespace {
+
struct ThreadPoolStatic : public rtl::StaticWithInit< std::shared_ptr< ThreadPool >,
ThreadPoolStatic >
{
@@ -114,6 +116,8 @@ struct ThreadPoolStatic : public rtl::StaticWithInit< std::shared_ptr< ThreadPoo
};
};
+}
+
ThreadPool& ThreadPool::getSharedOptimalPool()
{
return *ThreadPoolStatic::get();