summaryrefslogtreecommitdiff
path: root/binaryurp/source/unmarshal.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:10:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:17 +0100
commite68121b3c1d973d149adad4d8e1bcbe042107506 (patch)
treebeade9fd10b68520b6a782d536e4bbb1526dba96 /binaryurp/source/unmarshal.cxx
parent08e49fa3377d8c4e7e5df7a32233fcd9763ee936 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ic3516d9069cbe935f5b82aec0afac3facdc814a5
Diffstat (limited to 'binaryurp/source/unmarshal.cxx')
-rw-r--r--binaryurp/source/unmarshal.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index 43ddfa87db23..3f1f5fc42032 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -56,7 +56,7 @@ namespace {
void * allocate(sal_Size size) {
void * p = rtl_allocateMemory(size);
- if (p == 0) {
+ if (p == nullptr) {
throw std::bad_alloc();
}
return p;
@@ -70,12 +70,12 @@ std::vector< BinaryAny >::iterator copyMemberValues(
type.is() &&
(type.get()->eTypeClass == typelib_TypeClass_STRUCT ||
type.get()->eTypeClass == typelib_TypeClass_EXCEPTION) &&
- buffer != 0);
+ buffer != nullptr);
type.makeComplete();
std::vector< BinaryAny >::iterator i(it);
typelib_CompoundTypeDescription * ctd =
reinterpret_cast< typelib_CompoundTypeDescription * >(type.get());
- if (ctd->pBaseTypeDescription != 0) {
+ if (ctd->pBaseTypeDescription != nullptr) {
i = copyMemberValues(
css::uno::TypeDescription(&ctd->pBaseTypeDescription->aBase), i,
buffer);
@@ -84,7 +84,7 @@ std::vector< BinaryAny >::iterator copyMemberValues(
uno_type_copyData(
static_cast< char * >(buffer) + ctd->pMemberOffsets[j],
i++->getValue(css::uno::TypeDescription(ctd->ppTypeRefs[j])),
- ctd->ppTypeRefs[j], 0);
+ ctd->ppTypeRefs[j], nullptr);
}
return i;
}
@@ -345,7 +345,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
raw.pType = reinterpret_cast< typelib_TypeDescriptionReference * >(
type.get());
raw.pData = buf;
- raw.pReserved = 0;
+ raw.pReserved = nullptr;
return BinaryAny(raw);
}
case typelib_TypeClass_INTERFACE:
@@ -427,7 +427,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
"binaryurp::Unmarshal: sequence size too large");
}
if (n == 0) {
- return BinaryAny(type, 0);
+ return BinaryAny(type, nullptr);
}
css::uno::TypeDescription ctd(
reinterpret_cast< typelib_IndirectTypeDescription * >(
@@ -461,7 +461,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
for (sal_uInt32 i = 0; i != n; ++i) {
uno_copyData(
static_cast< sal_Sequence * >(buf)->elements + i * ctd.get()->nSize,
- as[i].getValue(ctd), ctd.get(), 0);
+ as[i].getValue(ctd), ctd.get(), nullptr);
}
return BinaryAny(type, &buf);
}
@@ -473,11 +473,11 @@ void Unmarshal::readMemberValues(
type.is() &&
(type.get()->eTypeClass == typelib_TypeClass_STRUCT ||
type.get()->eTypeClass == typelib_TypeClass_EXCEPTION) &&
- values != 0);
+ values != nullptr);
type.makeComplete();
typelib_CompoundTypeDescription * ctd =
reinterpret_cast< typelib_CompoundTypeDescription * >(type.get());
- if (ctd->pBaseTypeDescription != 0) {
+ if (ctd->pBaseTypeDescription != nullptr) {
readMemberValues(
css::uno::TypeDescription(&ctd->pBaseTypeDescription->aBase),
values);