summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-07-03 11:13:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-07-03 15:41:17 +0200
commitcd0474555eed3e65c145c85ed21baab8f09258d2 (patch)
tree7ed17fd8dee8001646508ee5af029c6db6074c42 /registry
parenta843c457044acc3155b0d3c49534e78569c69d96 (diff)
Make RegistryTypeReader non-copyable
(and note the operator == vs. = typo) Change-Id: I4567927f3f702f8e74b168becce4002e84d5c7a0
Diffstat (limited to 'registry')
-rw-r--r--registry/source/reflread.cxx17
-rw-r--r--registry/source/reflread.hxx11
2 files changed, 3 insertions, 25 deletions
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index 15e3f2f50841..aa8d61a85db6 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -1749,26 +1749,9 @@ RegistryTypeReader::RegistryTypeReader(const sal_uInt8* buffer,
m_hImpl = createEntry(buffer, bufferLen, copyData);
}
-RegistryTypeReader::RegistryTypeReader(const RegistryTypeReader& toCopy)
- : m_hImpl(toCopy.m_hImpl)
-{ typereg_reader_acquire(m_hImpl); }
-
-
RegistryTypeReader::~RegistryTypeReader()
{ typereg_reader_release(m_hImpl); }
-RegistryTypeReader& RegistryTypeReader::operator == (const RegistryTypeReader& toAssign)
-{
- if (m_hImpl != toAssign.m_hImpl)
- {
- typereg_reader_release(m_hImpl);
- m_hImpl = toAssign.m_hImpl;
- typereg_reader_acquire(m_hImpl);
- }
-
- return *this;
-}
-
RTTypeClass RegistryTypeReader::getTypeClass() const
{ return typereg_reader_getTypeClass(m_hImpl); }
diff --git a/registry/source/reflread.hxx b/registry/source/reflread.hxx
index a4f3b9feb515..6912fa8baf45 100644
--- a/registry/source/reflread.hxx
+++ b/registry/source/reflread.hxx
@@ -51,16 +51,9 @@ public:
sal_uInt32 bufferLen,
bool copyData);
- /// Copy constructcor
- RegistryTypeReader(const RegistryTypeReader& toCopy);
-
/// Destructor. The Destructor frees the data block if the copyData flag was TRUE.
~RegistryTypeReader();
- /// Assign operator
- RegistryTypeReader& operator == (const RegistryTypeReader& toAssign);
-
-
/** returns the typeclass of the type represented by this blob.
This function will always return the type class without the internal
@@ -113,7 +106,9 @@ public:
*/
rtl::OUString getFieldFileName( sal_uInt16 index ) const;
-protected:
+private:
+ RegistryTypeReader(RegistryTypeReader &) = delete;
+ void operator =(RegistryTypeReader) = delete;
/// stores the handle of an implementation class
TypeReaderImpl m_hImpl;