From 56775815a39c2ee4a0f711738947d2fb234c4923 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 20 Apr 2018 10:20:00 +0200 Subject: loplugin:constantparam Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d Reviewed-on: https://gerrit.libreoffice.org/53188 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/registry/reader.hxx | 2 +- include/registry/typereg_reader.hxx | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'include/registry') diff --git a/include/registry/reader.hxx b/include/registry/reader.hxx index 54b6a12f9541..d25e719119ed 100644 --- a/include/registry/reader.hxx +++ b/include/registry/reader.hxx @@ -58,7 +58,7 @@ public: */ Reader(void const * buffer, sal_uInt32 length) { - if (!typereg_reader_create(buffer, length, false/*copy*/, TYPEREG_VERSION_1, &m_handle)) + if (!typereg_reader_create(buffer, length, &m_handle)) { throw std::bad_alloc(); } diff --git a/include/registry/typereg_reader.hxx b/include/registry/typereg_reader.hxx index 3d5a2cfd830d..f6aa5f59b61c 100644 --- a/include/registry/typereg_reader.hxx +++ b/include/registry/typereg_reader.hxx @@ -34,19 +34,14 @@ reference count will be one. Operations on a non-null handle are not multi-thread–safe.

+ The type reader works directly on the given buffer, which must remain + available unmodified until the type reader is destroyed + @param buffer the binary blob representing the type; must point to at least length bytes, and need only be byte-aligned @param length the size in bytes of the binary blob representing the type - @param copy if true, the type reader creates an internal copy of the given - buffer, and the given buffer is not accessed after this function returns; if - false, the type reader works directly on the given buffer, which must remain - available unmodified until the type reader is destroyed - - @param maxVersion the maximum binary blob version the client is prepared to - handle; must not be negative - @param result an out-parameter obtaining a handle on the type reader; must not be null; if the given binary blob is malformed, or of a version larger than maxVersion, null is returned @@ -57,8 +52,8 @@ @since UDK 3.2.0 */ REG_DLLPUBLIC bool typereg_reader_create( - void const * buffer, sal_uInt32 length, bool copy, - typereg_Version maxVersion, void ** result); + void const * buffer, sal_uInt32 length, + void ** result); /** Increments the reference count of a type reader. -- cgit