summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-08 16:12:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-09 08:28:56 +0200
commit719a2adfbdac8ce26a035e5fedeeaade8706832d (patch)
tree541a185d2c60d83da75306bab6bd93527c9b4d73 /idlc
parent4763091bbecab8722a43d0ed73eafc0a1f596242 (diff)
remove unnecessary empty OUString fields and vars
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7 Reviewed-on: https://gerrit.libreoffice.org/37394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/astdump.cxx23
-rw-r--r--idlc/source/astenum.cxx5
-rw-r--r--idlc/source/astinterface.cxx5
-rw-r--r--idlc/source/aststruct.cxx9
4 files changed, 18 insertions, 24 deletions
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index 4847b4fc0669..5b12b08817a9 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -36,7 +36,6 @@
bool AstModule::dump(RegistryKey& rKey)
{
- OUString emptyStr;
RegistryKey localKey;
if ( getNodeType() == NT_root )
{
@@ -62,7 +61,7 @@ bool AstModule::dump(RegistryKey& rKey)
typereg::Writer aBlob(
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
- getDocumentation(), emptyStr, typeClass,
+ getDocumentation(), "", typeClass,
m_bPublished,
OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0,
nConst, 0, 0);
@@ -86,7 +85,7 @@ bool AstModule::dump(RegistryKey& rKey)
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
- if (localKey.setValue(emptyStr, RegValueType::BINARY,
+ if (localKey.setValue("", RegValueType::BINARY,
const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
@@ -102,7 +101,7 @@ bool AstModule::dump(RegistryKey& rKey)
typereg::Writer aBlob(
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
- getDocumentation(), emptyStr, typeClass, m_bPublished,
+ getDocumentation(), "", typeClass, m_bPublished,
OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0, 0, 0,
0);
@@ -111,7 +110,7 @@ bool AstModule::dump(RegistryKey& rKey)
if ( getNodeType() != NT_root )
{
- if (localKey.setValue(emptyStr, RegValueType::BINARY,
+ if (localKey.setValue("", RegValueType::BINARY,
const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
@@ -130,7 +129,6 @@ bool AstModule::dump(RegistryKey& rKey)
bool AstTypeDef::dump(RegistryKey& rKey)
{
- OUString emptyStr;
RegistryKey localKey;
if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey) != RegError::NO_ERROR)
{
@@ -142,7 +140,7 @@ bool AstTypeDef::dump(RegistryKey& rKey)
typereg::Writer aBlob(
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
- getDocumentation(), emptyStr, RT_TYPE_TYPEDEF, m_bPublished,
+ getDocumentation(), "", RT_TYPE_TYPEDEF, m_bPublished,
OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 1, 0, 0, 0);
aBlob.setSuperTypeName(
0,
@@ -152,7 +150,7 @@ bool AstTypeDef::dump(RegistryKey& rKey)
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
- if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
+ if (localKey.setValue("", RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -165,7 +163,6 @@ bool AstTypeDef::dump(RegistryKey& rKey)
bool AstService::dump(RegistryKey& rKey)
{
- OUString emptyStr;
typereg_Version version = m_bPublished
? TYPEREG_VERSION_1 : TYPEREG_VERSION_0;
OString superName;
@@ -230,7 +227,7 @@ bool AstService::dump(RegistryKey& rKey)
return false;
}
typereg::Writer writer(
- version, getDocumentation(), emptyStr,
+ version, getDocumentation(), "",
getNodeType() == NT_singleton ? RT_TYPE_SINGLETON : RT_TYPE_SERVICE,
m_bPublished,
OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8),
@@ -303,14 +300,14 @@ bool AstService::dump(RegistryKey& rKey)
}
if (m_defaultConstructor) {
writer.setMethodData(
- constructorIndex++, emptyStr, RTMethodMode::TWOWAY,
- emptyStr, "void",
+ constructorIndex++, "", RTMethodMode::TWOWAY,
+ "", "void",
0, 0);
}
sal_uInt32 size;
void const * blob = writer.getBlob(&size);
if (localKey.setValue(
- emptyStr, RegValueType::BINARY, const_cast< void * >(blob),
+ "", RegValueType::BINARY, const_cast< void * >(blob),
size) != RegError::NO_ERROR)
{
fprintf(
diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx
index ece9609a88d2..69fb0c7bfd89 100644
--- a/idlc/source/astenum.cxx
+++ b/idlc/source/astenum.cxx
@@ -66,13 +66,12 @@ bool AstEnum::dump(RegistryKey& rKey)
return false;
}
- OUString emptyStr;
sal_uInt16 nConst = getNodeCount(NT_enum_val);
if ( nConst > 0 )
{
typereg::Writer aBlob(
m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
- getDocumentation(), emptyStr, RT_TYPE_ENUM, m_bPublished,
+ getDocumentation(), "", RT_TYPE_ENUM, m_bPublished,
OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0,
nConst, 0, 0);
@@ -91,7 +90,7 @@ bool AstEnum::dump(RegistryKey& rKey)
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
- if (localKey.setValue(emptyStr, RegValueType::BINARY,
+ if (localKey.setValue("", RegValueType::BINARY,
const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx
index 8add687cc0be..90e5c060ece4 100644
--- a/idlc/source/astinterface.cxx
+++ b/idlc/source/astinterface.cxx
@@ -191,9 +191,8 @@ bool AstInterface::dump(RegistryKey& rKey)
}
}
- OUString emptyStr;
typereg::Writer aBlob(
- version, getDocumentation(), emptyStr, RT_TYPE_INTERFACE, m_bPublished,
+ version, getDocumentation(), "", RT_TYPE_INTERFACE, m_bPublished,
OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), nBaseTypes,
nAttributes, nMethods, nReferences);
@@ -242,7 +241,7 @@ bool AstInterface::dump(RegistryKey& rKey)
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
- if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
+ if (localKey.setValue("", RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx
index 5245f06c90f8..8b683d085f23 100644
--- a/idlc/source/aststruct.cxx
+++ b/idlc/source/aststruct.cxx
@@ -102,11 +102,10 @@ bool AstStruct::dump(RegistryKey& rKey)
if ( getNodeType() == NT_exception )
typeClass = RT_TYPE_EXCEPTION;
- OUString emptyStr;
typereg::Writer aBlob(
(m_typeParameters.empty() && !m_bPublished
? TYPEREG_VERSION_0 : TYPEREG_VERSION_1),
- getDocumentation(), emptyStr, typeClass, m_bPublished,
+ getDocumentation(), "", typeClass, m_bPublished,
OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8),
m_pBaseType == nullptr ? 0 : 1, nMember, 0,
static_cast< sal_uInt16 >(m_typeParameters.size()));
@@ -138,7 +137,7 @@ bool AstStruct::dump(RegistryKey& rKey)
typeName = pMember->getType()->getRelativName();
}
aBlob.setFieldData(
- index++, pMember->getDocumentation(), emptyStr, flags,
+ index++, pMember->getDocumentation(), "", flags,
OStringToOUString(
pMember->getLocalName(), RTL_TEXTENCODING_UTF8),
OStringToOUString(typeName, RTL_TEXTENCODING_UTF8),
@@ -153,7 +152,7 @@ bool AstStruct::dump(RegistryKey& rKey)
i != m_typeParameters.end(); ++i)
{
aBlob.setReferenceData(
- index++, emptyStr, RTReferenceType::TYPE_PARAMETER, RTFieldAccess::INVALID,
+ index++, "", RTReferenceType::TYPE_PARAMETER, RTFieldAccess::INVALID,
OStringToOUString(
(*i)->getLocalName(), RTL_TEXTENCODING_UTF8));
}
@@ -161,7 +160,7 @@ bool AstStruct::dump(RegistryKey& rKey)
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
- if (localKey.setValue(emptyStr, RegValueType::BINARY,
+ if (localKey.setValue("", RegValueType::BINARY,
const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",