Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
16f0c131
Kaydet (Commit)
16f0c131
authored
Kas 10, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:nullptr (automatic rewrite)
Change-Id: Ie5a37a49f1b1c08a20f89e167ca415fc645ed40d
üst
87686af6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
136 additions
and
136 deletions
+136
-136
reader.hxx
include/registry/reader.hxx
+34
-34
registry.hxx
include/registry/registry.hxx
+11
-11
writer.hxx
include/registry/writer.hxx
+2
-2
keyimpl.cxx
registry/source/keyimpl.cxx
+25
-25
reflread.cxx
registry/source/reflread.cxx
+0
-0
reflwrit.cxx
registry/source/reflwrit.cxx
+23
-23
regimpl.cxx
registry/source/regimpl.cxx
+5
-5
registry.cxx
registry/source/registry.cxx
+11
-11
regkey.cxx
registry/source/regkey.cxx
+23
-23
options.cxx
registry/tools/options.cxx
+2
-2
No files found.
include/registry/reader.hxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -45,7 +45,7 @@ public:
/**
Creates an invalid type reader.
*/
Reader
()
:
m_handle
(
0
)
{}
Reader
()
:
m_handle
(
nullptr
)
{}
/**
Creates a type reader.
...
...
@@ -119,7 +119,7 @@ public:
@return true iff this type reader is valid
*/
bool
isValid
()
const
{
return
m_handle
!=
0
;
return
m_handle
!=
nullptr
;
}
/**
...
...
@@ -142,9 +142,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getDocumentation
()
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getDocumentation
(
m_handle
,
&
s
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -160,9 +160,9 @@ public:
@deprecated
*/
rtl
::
OUString
getFileName
()
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getFileName
(
m_handle
,
&
s
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -201,9 +201,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getTypeName
()
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getTypeName
(
m_handle
,
&
s
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -230,9 +230,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getSuperTypeName
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getSuperTypeName
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -258,9 +258,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getFieldDocumentation
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getFieldDocumentation
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -277,9 +277,9 @@ public:
@deprecated
*/
rtl
::
OUString
getFieldFileName
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getFieldFileName
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -306,9 +306,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getFieldName
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getFieldName
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -324,9 +324,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getFieldTypeName
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getFieldTypeName
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -371,9 +371,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getMethodDocumentation
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getMethodDocumentation
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -400,9 +400,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getMethodName
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getMethodName
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -418,9 +418,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getMethodReturnTypeName
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getMethodReturnTypeName
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -471,10 +471,10 @@ public:
rtl
::
OUString
getMethodParameterName
(
sal_uInt16
methodIndex
,
sal_uInt16
parameterIndex
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getMethodParameterName
(
m_handle
,
&
s
,
methodIndex
,
parameterIndex
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -496,10 +496,10 @@ public:
rtl
::
OUString
getMethodParameterTypeName
(
sal_uInt16
methodIndex
,
sal_uInt16
parameterIndex
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getMethodParameterTypeName
(
m_handle
,
&
s
,
methodIndex
,
parameterIndex
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -532,10 +532,10 @@ public:
rtl
::
OUString
getMethodExceptionTypeName
(
sal_uInt16
methodIndex
,
sal_uInt16
exceptionIndex
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getMethodExceptionTypeName
(
m_handle
,
&
s
,
methodIndex
,
exceptionIndex
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -562,9 +562,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getReferenceDocumentation
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getReferenceDocumentation
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
@@ -605,9 +605,9 @@ public:
@exception std::bad_alloc is raised if an out-of-memory condition occurs
*/
rtl
::
OUString
getReferenceTypeName
(
sal_uInt16
index
)
const
{
rtl_uString
*
s
=
0
;
rtl_uString
*
s
=
nullptr
;
typereg_reader_getReferenceTypeName
(
m_handle
,
&
s
,
index
);
if
(
s
==
0
)
{
if
(
s
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
rtl
::
OUString
(
s
,
SAL_NO_ACQUIRE
);
...
...
include/registry/registry.hxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -606,7 +606,7 @@ protected:
inline
RegistryKeyArray
::
RegistryKeyArray
()
:
m_length
(
0
)
,
m_phKeys
(
NULL
)
,
m_phKeys
(
nullptr
)
{
}
...
...
@@ -640,7 +640,7 @@ inline void RegistryKeyArray::setKeyHandles(Registry& registry,
inline
RegistryKeyNames
::
RegistryKeyNames
()
:
m_length
(
0
)
,
m_pKeyNames
(
NULL
)
,
m_pKeyNames
(
nullptr
)
{
}
...
...
@@ -674,7 +674,7 @@ inline void RegistryKeyNames::setKeyNames(Registry& registry,
}
inline
RegistryKey
::
RegistryKey
()
:
m_hImpl
(
NULL
)
:
m_hImpl
(
nullptr
)
{
}
/// @cond INTERNAL
...
...
@@ -722,7 +722,7 @@ inline RegistryKey& RegistryKey::operator = (const RegistryKey& toAssign)
}
inline
bool
RegistryKey
::
isValid
()
const
{
return
(
m_hImpl
!=
NULL
);
}
{
return
(
m_hImpl
!=
nullptr
);
}
inline
bool
RegistryKey
::
isReadOnly
()
const
{
...
...
@@ -826,7 +826,7 @@ inline RegError RegistryKey::closeKey()
RegError
ret
=
m_registry
.
m_pApi
->
closeKey
(
m_hImpl
);
if
(
ret
==
RegError
::
NO_ERROR
)
{
m_hImpl
=
NULL
;
m_hImpl
=
nullptr
;
m_registry
=
Registry
();
}
return
ret
;
...
...
@@ -836,9 +836,9 @@ inline RegError RegistryKey::closeKey()
inline
void
RegistryKey
::
releaseKey
()
{
if
(
m_registry
.
isValid
()
&&
(
m_hImpl
!=
0
))
if
(
m_registry
.
isValid
()
&&
(
m_hImpl
!=
nullptr
))
{
m_registry
.
m_pApi
->
releaseKey
(
m_hImpl
),
m_hImpl
=
0
;
m_registry
.
m_pApi
->
releaseKey
(
m_hImpl
),
m_hImpl
=
nullptr
;
}
}
...
...
@@ -1028,7 +1028,7 @@ inline rtl::OUString RegistryKey::getRegistryName()
inline
Registry
::
Registry
()
:
m_pApi
(
initRegistry_Api
())
,
m_hImpl
(
NULL
)
,
m_hImpl
(
nullptr
)
{
}
inline
Registry
::
Registry
(
const
Registry
&
toCopy
)
...
...
@@ -1060,7 +1060,7 @@ inline Registry& Registry::operator = (const Registry& toAssign)
}
inline
bool
Registry
::
isValid
()
const
{
return
(
m_hImpl
!=
NULL
);
}
{
return
(
m_hImpl
!=
nullptr
);
}
inline
bool
Registry
::
isReadOnly
()
const
{
return
m_pApi
->
isReadOnly
(
m_hImpl
);
}
...
...
@@ -1097,7 +1097,7 @@ inline RegError Registry::close()
{
RegError
ret
=
m_pApi
->
closeRegistry
(
m_hImpl
);
if
(
ret
==
RegError
::
NO_ERROR
)
m_hImpl
=
NULL
;
m_hImpl
=
nullptr
;
return
ret
;
}
...
...
@@ -1105,7 +1105,7 @@ inline RegError Registry::destroy(const rtl::OUString& registryName)
{
RegError
ret
=
m_pApi
->
destroyRegistry
(
m_hImpl
,
registryName
.
pData
);
if
(
ret
==
RegError
::
NO_ERROR
&&
registryName
.
isEmpty
()
)
m_hImpl
=
NULL
;
m_hImpl
=
nullptr
;
return
ret
;
}
...
...
include/registry/writer.hxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -81,7 +81,7 @@ public:
published
,
typeName
.
pData
,
superTypeCount
,
fieldCount
,
methodCount
,
referenceCount
))
{
if
(
m_handle
==
0
)
{
if
(
m_handle
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
}
...
...
@@ -271,7 +271,7 @@ public:
*/
void
const
*
getBlob
(
sal_uInt32
*
size
)
{
void
const
*
p
=
typereg_writer_getBlob
(
m_handle
,
size
);
if
(
p
==
0
)
{
if
(
p
==
nullptr
)
{
throw
std
::
bad_alloc
();
}
return
p
;
...
...
registry/source/keyimpl.cxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -85,7 +85,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
{
RegError
_ret
=
RegError
::
NO_ERROR
;
*
phOpenSubKeys
=
0
;
*
phOpenSubKeys
=
nullptr
;
*
pnSubKeys
=
0
;
ORegKey
*
pKey
=
this
;
...
...
@@ -113,11 +113,11 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
{
OUString
const
sSubKeyName
=
iter
.
m_pszName
;
ORegKey
*
pOpenSubKey
=
0
;
ORegKey
*
pOpenSubKey
=
nullptr
;
_ret
=
pKey
->
openKey
(
sSubKeyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pOpenSubKey
));
if
(
_ret
!=
RegError
::
NO_ERROR
)
{
*
phOpenSubKeys
=
NULL
;
*
phOpenSubKeys
=
nullptr
;
*
pnSubKeys
=
0
;
rtl_freeMemory
(
pSubKeys
);
// @@@ leaking 'pSubKeys[0...nSubkeys-1]'
return
_ret
;
// @@@ leaking 'pKey'
...
...
@@ -149,7 +149,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
{
RegError
_ret
=
RegError
::
NO_ERROR
;
*
pSubKeyNames
=
0
;
*
pSubKeyNames
=
nullptr
;
*
pnSubKeys
=
0
;
ORegKey
*
pKey
=
this
;
...
...
@@ -163,7 +163,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
sal_uInt32
nSubKeys
=
pKey
->
countSubKeys
();
*
pnSubKeys
=
nSubKeys
;
rtl_uString
**
pSubKeys
=
0
;
rtl_uString
**
pSubKeys
=
nullptr
;
pSubKeys
=
static_cast
<
rtl_uString
**>
(
rtl_allocateZeroMemory
(
nSubKeys
*
sizeof
(
rtl_uString
*
)));
OStoreDirectory
::
iterator
iter
;
...
...
@@ -672,7 +672,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
if
(
rValue
.
create
(
getStoreFile
(),
m_name
+
m_pRegistry
->
ROOT
,
sImplValueName
,
accessMode
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
return
RegError
::
VALUE_NOT_EXISTS
;
}
...
...
@@ -682,14 +682,14 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
}
if
(
readBytes
!=
VALUE_HEADERSIZE
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -700,7 +700,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
if
(
valueType
!=
RegValueType
::
LONGLIST
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -714,7 +714,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
/* surely 10 millions entry in a registry list should be enough */
if
(
valueSize
>
40000000
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -723,14 +723,14 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
readBytes
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
}
if
(
readBytes
!=
valueSize
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -742,7 +742,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
/* make sure the declared size of the arry is consistent with the amount of data we have read */
if
(
len
>
(
valueSize
-
4
)
/
4
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -786,7 +786,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
if
(
rValue
.
create
(
getStoreFile
(),
m_name
+
m_pRegistry
->
ROOT
,
sImplValueName
,
accessMode
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
return
RegError
::
VALUE_NOT_EXISTS
;
}
...
...
@@ -796,14 +796,14 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
}
if
(
readBytes
!=
VALUE_HEADERSIZE
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -814,7 +814,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
if
(
valueType
!=
RegValueType
::
STRINGLIST
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -828,14 +828,14 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
readBytes
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
}
if
(
readBytes
!=
valueSize
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -892,7 +892,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
if
(
rValue
.
create
(
getStoreFile
(),
m_name
+
m_pRegistry
->
ROOT
,
sImplValueName
,
accessMode
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
return
RegError
::
VALUE_NOT_EXISTS
;
}
...
...
@@ -902,14 +902,14 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
}
if
(
readBytes
!=
VALUE_HEADERSIZE
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -920,7 +920,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
if
(
valueType
!=
RegValueType
::
UNICODELIST
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
@@ -934,14 +934,14 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
readBytes
)
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
}
if
(
readBytes
!=
valueSize
)
{
pValueList
=
NULL
;
pValueList
=
nullptr
;
*
pLen
=
0
;
rtl_freeMemory
(
pBuffer
);
return
RegError
::
INVALID_VALUE
;
...
...
registry/source/reflread.cxx
Dosyayı görüntüle @
16f0c131
This diff is collapsed.
Click to expand it.
registry/source/reflwrit.cxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -196,7 +196,7 @@ struct CPInfo
CPInfo
::
CPInfo
(
CPInfoTag
tag
,
struct
CPInfo
*
prev
)
:
m_tag
(
tag
)
,
m_index
(
0
)
,
m_next
(
NULL
)
,
m_next
(
nullptr
)
{
if
(
prev
)
{
...
...
@@ -377,8 +377,8 @@ void FieldEntry::setData(const OString& name,
RTValueType
constValueType
,
RTConstValueUnion
constValue
)
{
sal_Unicode
*
newValue
=
0
;
if
(
constValueType
==
RT_TYPE_STRING
&&
constValue
.
aString
!=
0
)
{
sal_Unicode
*
newValue
=
nullptr
;
if
(
constValueType
==
RT_TYPE_STRING
&&
constValue
.
aString
!=
nullptr
)
{
sal_Int32
n
=
rtl_ustr_getLength
(
constValue
.
aString
)
+
1
;
newValue
=
new
sal_Unicode
[
n
];
memcpy
(
newValue
,
constValue
.
aString
,
n
*
sizeof
(
sal_Unicode
));
...
...
@@ -403,7 +403,7 @@ void FieldEntry::setData(const OString& name,
if
(
m_constValueType
==
RT_TYPE_STRING
)
{
if
(
constValue
.
aString
==
NULL
)
if
(
constValue
.
aString
==
nullptr
)
m_constValue
.
aString
=
NULL_WSTRING
;
else
{
...
...
@@ -581,7 +581,7 @@ void MethodEntry::reallocParams(sal_uInt16 size)
if
(
size
)
newParams
=
new
ParamEntry
[
size
];
else
newParams
=
NULL
;
newParams
=
nullptr
;
if
(
m_paramCount
)
{
...
...
@@ -607,7 +607,7 @@ void MethodEntry::reallocExcs(sal_uInt16 size)
if
(
size
)
newExcNames
=
new
OString
[
size
];
else
newExcNames
=
NULL
;
newExcNames
=
nullptr
;
sal_uInt16
i
;
sal_uInt16
mn
=
size
<
m_excCount
?
size
:
m_excCount
;
...
...
@@ -687,15 +687,15 @@ TypeWriter::TypeWriter(typereg_Version version,
RTTypeClass
|
(
published
?
RT_TYPE_PUBLISHED
:
0
)))
,
m_typeName
(
typeName
)
,
m_nSuperTypes
(
superTypeCount
)
,
m_pUik
(
NULL
)
,
m_pUik
(
nullptr
)
,
m_doku
(
documentation
)
,
m_fileName
(
fileName
)
,
m_fieldCount
(
fieldCount
)
,
m_fields
(
NULL
)
,
m_fields
(
nullptr
)
,
m_methodCount
(
methodCount
)
,
m_methods
(
NULL
)
,
m_methods
(
nullptr
)
,
m_referenceCount
(
referenceCount
)
,
m_references
(
NULL
)
,
m_references
(
nullptr
)
,
m_blopSize
(
0
)
{
if
(
m_nSuperTypes
>
0
)
...
...
@@ -703,7 +703,7 @@ TypeWriter::TypeWriter(typereg_Version version,
m_superTypeNames
=
new
OString
[
m_nSuperTypes
];
}
else
{
m_superTypeNames
=
NULL
;
m_superTypeNames
=
nullptr
;
}
if
(
m_fieldCount
)
...
...
@@ -743,21 +743,21 @@ void TypeWriter::createBlop()
{
//TODO: Fix memory leaks that occur when std::bad_alloc is thrown
sal_uInt8
*
pBlopFields
=
NULL
;
sal_uInt8
*
pBlopMethods
=
NULL
;
sal_uInt8
*
pBlopReferences
=
NULL
;
sal_uInt8
*
pBuffer
=
NULL
;
sal_uInt8
*
pBlopFields
=
nullptr
;
sal_uInt8
*
pBlopMethods
=
nullptr
;
sal_uInt8
*
pBlopReferences
=
nullptr
;
sal_uInt8
*
pBuffer
=
nullptr
;
sal_uInt32
blopFieldsSize
=
0
;
sal_uInt32
blopMethodsSize
=
0
;
sal_uInt32
blopReferenceSize
=
0
;
CPInfo
root
(
CP_TAG_INVALID
,
NULL
);
CPInfo
root
(
CP_TAG_INVALID
,
nullptr
);
sal_uInt16
cpIndexThisName
=
0
;
sal_uInt16
*
cpIndexSuperNames
=
NULL
;
sal_uInt16
*
cpIndexSuperNames
=
nullptr
;
sal_uInt16
cpIndexUik
=
0
;
sal_uInt16
cpIndexDoku
=
0
;
sal_uInt16
cpIndexFileName
=
0
;
CPInfo
*
pInfo
=
NULL
;
CPInfo
*
pInfo
=
nullptr
;
sal_uInt16
entrySize
=
sizeof
(
sal_uInt16
);
sal_uInt32
blopHeaderEntrySize
=
BLOP_OFFSET_N_ENTRIES
+
entrySize
+
(
BLOP_HEADER_N_ENTRIES
*
entrySize
);
...
...
@@ -792,7 +792,7 @@ void TypeWriter::createBlop()
}
// create CP entry for uik
if
(
m_pUik
!=
NULL
)
if
(
m_pUik
!=
nullptr
)
{
pInfo
=
new
CPInfo
(
CP_TAG_UIK
,
pInfo
);
pInfo
->
m_value
.
aUik
=
m_pUik
;
...
...
@@ -1154,7 +1154,7 @@ static void TYPEREG_CALLTYPE release(TypeWriterImpl hEntry)
{
TypeWriter
*
pEntry
=
static_cast
<
TypeWriter
*>
(
hEntry
);
if
(
pEntry
!=
NULL
)
if
(
pEntry
!=
nullptr
)
{
if
(
--
pEntry
->
m_refCount
==
0
)
delete
pEntry
;
...
...
@@ -1248,7 +1248,7 @@ void const * TYPEREG_CALLTYPE typereg_writer_getBlob(void * handle, sal_uInt32 *
try
{
writer
->
createBlop
();
}
catch
(
std
::
bad_alloc
&
)
{
return
0
;
return
nullptr
;
}
}
*
size
=
writer
->
m_blopSize
;
...
...
@@ -1296,7 +1296,7 @@ void * TYPEREG_CALLTYPE typereg_writer_create(
typeClass
,
published
,
toByteString
(
typeName
),
superTypeCount
,
fieldCount
,
methodCount
,
referenceCount
);
}
catch
(
std
::
bad_alloc
&
)
{
return
0
;
return
nullptr
;
}
}
...
...
@@ -1341,7 +1341,7 @@ RegistryTypeWriter::RegistryTypeWriter(RTTypeClass RTTypeClass,
sal_uInt16
fieldCount
,
sal_uInt16
methodCount
,
sal_uInt16
referenceCount
)
:
m_hImpl
(
NULL
)
:
m_hImpl
(
nullptr
)
{
m_hImpl
=
createEntry
(
RTTypeClass
,
typeName
.
pData
,
...
...
registry/source/regimpl.cxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -441,7 +441,7 @@ ORegistry::ORegistry()
ORegistry
::~
ORegistry
()
{
ORegKey
*
pRootKey
=
m_openKeyTable
[
ROOT
];
if
(
pRootKey
!=
0
)
if
(
pRootKey
!=
nullptr
)
(
void
)
releaseKey
(
pRootKey
);
if
(
m_file
.
isValid
())
...
...
@@ -639,7 +639,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName,
{
ORegKey
*
pKey
;
*
phNewKey
=
NULL
;
*
phNewKey
=
nullptr
;
if
(
keyName
.
isEmpty
()
)
return
RegError
::
INVALID_KEYNAME
;
...
...
@@ -700,7 +700,7 @@ RegError ORegistry::openKey(RegKeyHandle hKey, const OUString& keyName,
{
ORegKey
*
pKey
;
*
phOpenKey
=
NULL
;
*
phOpenKey
=
nullptr
;
if
(
keyName
.
isEmpty
()
)
{
...
...
@@ -829,7 +829,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName)
sFullPath
+=
ROOT
;
}
ORegKey
*
pOldKey
=
0
;
ORegKey
*
pOldKey
=
nullptr
;
_ret
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pOldKey
));
if
(
_ret
!=
RegError
::
NO_ERROR
)
return
_ret
;
...
...
@@ -1360,7 +1360,7 @@ RegError ORegistry::loadAndSaveKeys(ORegKey* pTargetKey,
m_openKeyTable
[
sFullKeyName
]
->
setDeleted
(
false
);
}
ORegKey
*
pTmpKey
=
0
;
ORegKey
*
pTmpKey
=
nullptr
;
_ret
=
pSourceKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pTmpKey
));
if
(
_ret
!=
RegError
::
NO_ERROR
)
return
_ret
;
...
...
registry/source/registry.cxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -46,7 +46,7 @@ static void REGISTRY_CALLTYPE acquire(RegHandle hReg)
{
ORegistry
*
pReg
=
static_cast
<
ORegistry
*>
(
hReg
);
if
(
pReg
!=
NULL
)
if
(
pReg
!=
nullptr
)
pReg
->
acquire
();
}
...
...
@@ -63,7 +63,7 @@ static void REGISTRY_CALLTYPE release(RegHandle hReg)
if
(
pReg
->
release
()
==
0
)
{
delete
pReg
;
hReg
=
NULL
;
hReg
=
nullptr
;
}
}
}
...
...
@@ -117,7 +117,7 @@ static RegError REGISTRY_CALLTYPE createRegistry(rtl_uString* registryName,
if
((
ret
=
pReg
->
initRegistry
(
registryName
,
RegAccessMode
::
READWRITE
,
true
/*bCreate*/
))
!=
RegError
::
NO_ERROR
)
{
delete
pReg
;
*
phRegistry
=
NULL
;
*
phRegistry
=
nullptr
;
return
ret
;
}
...
...
@@ -141,7 +141,7 @@ static RegError REGISTRY_CALLTYPE openRootKey(RegHandle hReg,
return
RegError
::
REGISTRY_NOT_OPEN
;
}
else
{
phRootKey
=
NULL
;
phRootKey
=
nullptr
;
return
RegError
::
INVALID_REGISTRY
;
}
...
...
@@ -163,7 +163,7 @@ static RegError REGISTRY_CALLTYPE openRegistry(rtl_uString* registryName,
ORegistry
*
pReg
=
new
ORegistry
();
if
((
_ret
=
pReg
->
initRegistry
(
registryName
,
accessMode
))
!=
RegError
::
NO_ERROR
)
{
*
phRegistry
=
NULL
;
*
phRegistry
=
nullptr
;
delete
pReg
;
return
_ret
;
}
...
...
@@ -191,7 +191,7 @@ static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg)
if
(
pReg
->
release
()
==
0
)
{
delete
(
pReg
);
hReg
=
NULL
;
hReg
=
nullptr
;
}
else
ret
=
pReg
->
closeRegistry
();
...
...
@@ -224,7 +224,7 @@ static RegError REGISTRY_CALLTYPE destroyRegistry(RegHandle hReg,
if
(
!
registryName
->
length
)
{
delete
(
pReg
);
hReg
=
NULL
;
hReg
=
nullptr
;
}
}
return
ret
;
...
...
@@ -263,7 +263,7 @@ static RegError REGISTRY_CALLTYPE loadKey(RegHandle hReg,
return
RegError
::
REGISTRY_READONLY
;
ORegKey
*
pNewKey
=
0
;
ORegKey
*
pNewKey
=
nullptr
;
RegError
_ret
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pNewKey
));
if
(
_ret
==
RegError
::
NO_ERROR
)
{
...
...
@@ -311,7 +311,7 @@ static RegError REGISTRY_CALLTYPE saveKey(RegHandle hReg,
if
(
pKey
->
isDeleted
())
return
RegError
::
INVALID_KEY
;
ORegKey
*
pNewKey
=
0
;
ORegKey
*
pNewKey
=
nullptr
;
RegError
_ret
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pNewKey
));
if
(
_ret
!=
RegError
::
NO_ERROR
)
return
_ret
;
...
...
@@ -354,7 +354,7 @@ static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg,
if
(
keyName
->
length
)
{
ORegKey
*
pNewKey
=
0
;
ORegKey
*
pNewKey
=
nullptr
;
RegError
_ret
=
pKey
->
createKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pNewKey
));
if
(
_ret
!=
RegError
::
NO_ERROR
)
return
_ret
;
...
...
@@ -468,7 +468,7 @@ RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryName,
if
((
_ret
=
pReg
->
initRegistry
(
registryName
,
accessMode
))
!=
RegError
::
NO_ERROR
)
{
delete
pReg
;
*
phRegistry
=
NULL
;
*
phRegistry
=
nullptr
;
return
_ret
;
}
...
...
registry/source/regkey.cxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -33,7 +33,7 @@
void
REGISTRY_CALLTYPE
acquireKey
(
RegKeyHandle
hKey
)
{
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
if
(
pKey
!=
0
)
if
(
pKey
!=
nullptr
)
{
ORegistry
*
pReg
=
pKey
->
getRegistry
();
(
void
)
pReg
->
acquireKey
(
pKey
);
...
...
@@ -47,7 +47,7 @@ void REGISTRY_CALLTYPE acquireKey(RegKeyHandle hKey)
void
REGISTRY_CALLTYPE
releaseKey
(
RegKeyHandle
hKey
)
{
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
if
(
pKey
!=
0
)
if
(
pKey
!=
nullptr
)
{
ORegistry
*
pReg
=
pKey
->
getRegistry
();
(
void
)
pReg
->
releaseKey
(
pKey
);
...
...
@@ -61,7 +61,7 @@ void REGISTRY_CALLTYPE releaseKey(RegKeyHandle hKey)
sal_Bool
REGISTRY_CALLTYPE
isKeyReadOnly
(
RegKeyHandle
hKey
)
{
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
return
pKey
!=
0
&&
pKey
->
isReadOnly
();
return
pKey
!=
nullptr
&&
pKey
->
isReadOnly
();
}
...
...
@@ -90,7 +90,7 @@ RegError REGISTRY_CALLTYPE createKey(RegKeyHandle hKey,
rtl_uString
*
keyName
,
RegKeyHandle
*
phNewKey
)
{
*
phNewKey
=
0
;
*
phNewKey
=
nullptr
;
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
if
(
!
pKey
)
...
...
@@ -112,7 +112,7 @@ RegError REGISTRY_CALLTYPE openKey(RegKeyHandle hKey,
rtl_uString
*
keyName
,
RegKeyHandle
*
phOpenKey
)
{
*
phOpenKey
=
0
;
*
phOpenKey
=
nullptr
;
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
if
(
!
pKey
)
...
...
@@ -132,7 +132,7 @@ RegError REGISTRY_CALLTYPE openSubKeys(RegKeyHandle hKey,
RegKeyHandle
**
pphSubKeys
,
sal_uInt32
*
pnSubKeys
)
{
*
pphSubKeys
=
NULL
;
*
pphSubKeys
=
nullptr
;
*
pnSubKeys
=
0
;
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
...
...
@@ -151,7 +151,7 @@ RegError REGISTRY_CALLTYPE openSubKeys(RegKeyHandle hKey,
RegError
REGISTRY_CALLTYPE
closeSubKeys
(
RegKeyHandle
*
phSubKeys
,
sal_uInt32
nSubKeys
)
{
if
(
phSubKeys
==
0
||
nSubKeys
==
0
)
if
(
phSubKeys
==
nullptr
||
nSubKeys
==
0
)
return
RegError
::
INVALID_KEY
;
ORegistry
*
pReg
=
static_cast
<
ORegKey
*>
(
phSubKeys
[
0
])
->
getRegistry
();
...
...
@@ -217,7 +217,7 @@ RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -259,7 +259,7 @@ RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -301,7 +301,7 @@ RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -343,7 +343,7 @@ RegError REGISTRY_CALLTYPE setUnicodeListValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -388,7 +388,7 @@ RegError REGISTRY_CALLTYPE getValueInfo(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret
!=
RegError
::
NO_ERROR
)
return
_ret
;
...
...
@@ -434,7 +434,7 @@ RegError REGISTRY_CALLTYPE getValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -460,8 +460,8 @@ RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey,
sal_Int32
**
pValueList
,
sal_uInt32
*
pLen
)
{
assert
((
pValueList
!=
0
)
&&
(
pLen
!=
0
)
&&
"registry::getLongListValue(): invalid parameter"
);
*
pValueList
=
0
,
*
pLen
=
0
;
assert
((
pValueList
!=
nullptr
)
&&
(
pLen
!=
nullptr
)
&&
"registry::getLongListValue(): invalid parameter"
);
*
pValueList
=
nullptr
,
*
pLen
=
0
;
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
if
(
!
pKey
)
...
...
@@ -473,7 +473,7 @@ RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -499,8 +499,8 @@ RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey,
sal_Char
***
pValueList
,
sal_uInt32
*
pLen
)
{
OSL_PRECOND
((
pValueList
!=
0
)
&&
(
pLen
!=
0
),
"registry::getStringListValue(): invalid parameter"
);
*
pValueList
=
0
,
*
pLen
=
0
;
OSL_PRECOND
((
pValueList
!=
nullptr
)
&&
(
pLen
!=
nullptr
),
"registry::getStringListValue(): invalid parameter"
);
*
pValueList
=
nullptr
,
*
pLen
=
0
;
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
if
(
!
pKey
)
...
...
@@ -512,7 +512,7 @@ RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -536,8 +536,8 @@ RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey,
sal_Unicode
***
pValueList
,
sal_uInt32
*
pLen
)
{
assert
((
pValueList
!=
0
)
&&
(
pLen
!=
0
)
&&
"registry::getUnicodeListValue(): invalid parameter"
);
*
pValueList
=
0
,
*
pLen
=
0
;
assert
((
pValueList
!=
nullptr
)
&&
(
pLen
!=
nullptr
)
&&
"registry::getUnicodeListValue(): invalid parameter"
);
*
pValueList
=
nullptr
,
*
pLen
=
0
;
ORegKey
*
pKey
=
static_cast
<
ORegKey
*
>
(
hKey
);
if
(
!
pKey
)
...
...
@@ -549,7 +549,7 @@ RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey,
OUString
valueName
(
"value"
);
if
(
keyName
->
length
)
{
ORegKey
*
pSubKey
=
0
;
ORegKey
*
pSubKey
=
nullptr
;
RegError
_ret1
=
pKey
->
openKey
(
keyName
,
reinterpret_cast
<
RegKeyHandle
*>
(
&
pSubKey
));
if
(
_ret1
!=
RegError
::
NO_ERROR
)
return
_ret1
;
...
...
@@ -607,7 +607,7 @@ RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType,
return
RegError
::
INVALID_VALUE
;
}
pValueList
=
NULL
;
pValueList
=
nullptr
;
return
RegError
::
NO_ERROR
;
}
...
...
registry/tools/options.cxx
Dosyayı görüntüle @
16f0c131
...
...
@@ -39,7 +39,7 @@ Options::~Options()
// static
bool
Options
::
checkArgument
(
std
::
vector
<
std
::
string
>
&
rArgs
,
char
const
*
arg
,
size_t
len
)
{
bool
result
=
((
arg
!=
0
)
&&
(
len
>
0
));
bool
result
=
((
arg
!=
nullptr
)
&&
(
len
>
0
));
OSL_PRECOND
(
result
,
"registry::tools::Options::checkArgument(): invalid arguments"
);
if
(
result
)
{
...
...
@@ -81,7 +81,7 @@ bool Options::checkArgument(std::vector< std::string> & rArgs, char const * arg,
bool
Options
::
checkCommandFile
(
std
::
vector
<
std
::
string
>
&
rArgs
,
char
const
*
filename
)
{
FILE
*
fp
=
fopen
(
filename
,
"r"
);
if
(
fp
==
0
)
if
(
fp
==
nullptr
)
{
fprintf
(
stderr
,
"ERROR: Can't open command file
\"
%s
\"\n
"
,
filename
);
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment