summaryrefslogtreecommitdiff
path: root/include/osl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-02-07 12:26:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-02-07 12:36:01 +0100
commit4a2f64620370587161b5437069c2f1d9f3d702d1 (patch)
tree5dac0ae9aaff806b9abe5c120d964abb4c360bed /include/osl
parent034f2e1a2ace6c05e0a9fde192f4929303754544 (diff)
loplugin:deletedspecial
Change-Id: I646d55ee80ceeefbb3647ec64278460cc5af579f
Diffstat (limited to 'include/osl')
-rw-r--r--include/osl/conditn.hxx19
-rw-r--r--include/osl/diagnose.hxx5
-rw-r--r--include/osl/file.hxx16
-rw-r--r--include/osl/module.hxx4
-rw-r--r--include/osl/mutex.hxx32
-rw-r--r--include/osl/thread.hxx8
6 files changed, 29 insertions, 55 deletions
diff --git a/include/osl/conditn.hxx b/include/osl/conditn.hxx
index 9485e7f41aed..0859a1419bd6 100644
--- a/include/osl/conditn.hxx
+++ b/include/osl/conditn.hxx
@@ -97,25 +97,12 @@ namespace osl
constructed Condition may work on an already destructed oslCondition object.
*/
- Condition(const Condition&);
+ Condition(const Condition&) SAL_DELETED_FUNCTION;
- /** The underlying oslCondition has no reference count.
-
- When destructed, the Condition object destroys the undelying oslCondition,
- which might cause severe problems in case it's a temporary object.
-
- */
- Condition(oslCondition condition);
-
- /** This assignment operator is private for the same reason as
+ /** This assignment operator is deleted for the same reason as
the copy constructor.
*/
- Condition& operator= (const Condition&);
-
- /** This assignment operator is private for the same reason as
- the constructor taking a oslCondition argument.
- */
- Condition& operator= (oslCondition);
+ Condition& operator= (const Condition&) SAL_DELETED_FUNCTION;
};
}
diff --git a/include/osl/diagnose.hxx b/include/osl/diagnose.hxx
index e93573a49425..577b07c91d83 100644
--- a/include/osl/diagnose.hxx
+++ b/include/osl/diagnose.hxx
@@ -136,9 +136,8 @@ public:
}
private:
- // not impl:
- ObjectRegistry( ObjectRegistry const& );
- ObjectRegistry const& operator=( ObjectRegistry const& );
+ ObjectRegistry( ObjectRegistry const& ) SAL_DELETED_FUNCTION;
+ ObjectRegistry const& operator=( ObjectRegistry const& ) SAL_DELETED_FUNCTION;
ObjectRegistryData m_data;
};
diff --git a/include/osl/file.hxx b/include/osl/file.hxx
index 2c65fcd66e9b..19489484cb3b 100644
--- a/include/osl/file.hxx
+++ b/include/osl/file.hxx
@@ -419,12 +419,12 @@ class VolumeInfo
/** Copy constructor.
*/
- VolumeInfo( VolumeInfo& );
+ VolumeInfo( VolumeInfo& ) SAL_DELETED_FUNCTION;
/** Assginment operator.
*/
- VolumeInfo& operator = ( VolumeInfo& );
+ VolumeInfo& operator = ( VolumeInfo& ) SAL_DELETED_FUNCTION;
public:
@@ -657,12 +657,12 @@ class FileStatus
/** Copy constructor.
*/
- FileStatus( FileStatus& );
+ FileStatus( FileStatus& ) SAL_DELETED_FUNCTION;
/** Assignment operator.
*/
- FileStatus& operator = ( FileStatus& );
+ FileStatus& operator = ( FileStatus& ) SAL_DELETED_FUNCTION;
public:
@@ -911,12 +911,12 @@ class File: public FileBase
/** Copy constructor.
*/
- File( File& );
+ File( File& ) SAL_DELETED_FUNCTION;
/** Assginment operator.
*/
- File& operator = ( File& );
+ File& operator = ( File& ) SAL_DELETED_FUNCTION;
public:
@@ -1654,12 +1654,12 @@ class Directory: public FileBase
/** Copy constructor.
*/
- Directory( Directory& );
+ Directory( Directory& ) SAL_DELETED_FUNCTION;
/** Assignment operator.
*/
- Directory& operator = ( Directory& );
+ Directory& operator = ( Directory& ) SAL_DELETED_FUNCTION;
public:
diff --git a/include/osl/module.hxx b/include/osl/module.hxx
index 058a1d155abe..7858ad0695e5 100644
--- a/include/osl/module.hxx
+++ b/include/osl/module.hxx
@@ -28,8 +28,8 @@ namespace osl
class Module
{
- Module( const Module&);
- Module& operator = ( const Module&);
+ Module( const Module&) SAL_DELETED_FUNCTION;
+ Module& operator = ( const Module&) SAL_DELETED_FUNCTION;
public:
static bool getUrlFromAddress(void * addr, ::rtl::OUString & libraryUrl) {
diff --git a/include/osl/mutex.hxx b/include/osl/mutex.hxx
index 4722cd6a3758..f42323b9fd0a 100644
--- a/include/osl/mutex.hxx
+++ b/include/osl/mutex.hxx
@@ -94,25 +94,12 @@ namespace osl
constructed Mutex may work on an already destructed oslMutex object.
*/
- Mutex(const Mutex&);
+ Mutex(const Mutex&) SAL_DELETED_FUNCTION;
- /** The underlying oslMutex has no reference count.
-
- When destructed, the Mutex object destroys the undelying oslMutex,
- which might cause severe problems in case it's a temporary object.
-
- */
- Mutex(oslMutex Mutex);
-
- /** This assignment operator is private for the same reason as
+ /** This assignment operator is deleted for the same reason as
the copy constructor.
*/
- Mutex& operator= (const Mutex&);
-
- /** This assignment operator is private for the same reason as
- the constructor taking a oslMutex argument.
- */
- Mutex& operator= (oslMutex);
+ Mutex& operator= (const Mutex&) SAL_DELETED_FUNCTION;
};
/** A helper class for mutex objects and interfaces.
@@ -121,8 +108,8 @@ namespace osl
class Guard
{
private:
- Guard( const Guard& );
- const Guard& operator = ( const Guard& );
+ Guard( const Guard& ) SAL_DELETED_FUNCTION;
+ const Guard& operator = ( const Guard& ) SAL_DELETED_FUNCTION;
protected:
T * pT;
@@ -155,8 +142,9 @@ namespace osl
class ClearableGuard
{
private:
- ClearableGuard( const ClearableGuard& );
- const ClearableGuard& operator = ( const ClearableGuard& );
+ ClearableGuard( const ClearableGuard& ) SAL_DELETED_FUNCTION;
+ const ClearableGuard& operator = ( const ClearableGuard& )
+ SAL_DELETED_FUNCTION;
protected:
T * pT;
public:
@@ -201,8 +189,8 @@ namespace osl
class ResettableGuard : public ClearableGuard< T >
{
private:
- ResettableGuard(ResettableGuard &); // not defined
- void operator =(ResettableGuard &); // not defined
+ ResettableGuard(ResettableGuard &) SAL_DELETED_FUNCTION;
+ void operator =(ResettableGuard &) SAL_DELETED_FUNCTION;
protected:
T* pResetT;
diff --git a/include/osl/thread.hxx b/include/osl/thread.hxx
index 0c095a2055d9..8d9a82c2d9b5 100644
--- a/include/osl/thread.hxx
+++ b/include/osl/thread.hxx
@@ -46,8 +46,8 @@ extern "C" inline void SAL_CALL threadFunc( void* param);
*/
class Thread
{
- Thread( const Thread& );
- Thread& operator= ( const Thread& );
+ Thread( const Thread& ) SAL_DELETED_FUNCTION;
+ Thread& operator= ( const Thread& ) SAL_DELETED_FUNCTION;
public:
// these are here to force memory de/allocation to sal lib.
inline static void * SAL_CALL operator new( size_t nSize )
@@ -187,8 +187,8 @@ extern "C" inline void SAL_CALL threadFunc( void* param)
class ThreadData
{
- ThreadData( const ThreadData& );
- ThreadData& operator= (const ThreadData& );
+ ThreadData( const ThreadData& ) SAL_DELETED_FUNCTION;
+ ThreadData& operator= (const ThreadData& ) SAL_DELETED_FUNCTION;
public:
/// Create a thread specific local data key
ThreadData( oslThreadKeyCallbackFunction pCallback= 0 )