[Libreoffice-commits] .: cppuhelper/source cpputools/source jvmfwk/plugins jvmfwk/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Tue May 17 05:56:39 PDT 2011
cppuhelper/source/interfacecontainer.cxx | 4 ++--
cpputools/source/unoexe/unoexe.cxx | 2 +-
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 8 ++++----
jvmfwk/source/framework.cxx | 2 +-
jvmfwk/source/libxmlutil.cxx | 8 ++++----
jvmfwk/source/libxmlutil.hxx | 9 ++++-----
6 files changed, 16 insertions(+), 17 deletions(-)
New commits:
commit e023dd9c028cdb359afc968fed3e82f8090a9ce5
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue May 17 12:44:26 2011 +0200
Some cppcheck cleaning
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index 2d642d5..7a9440c 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -419,7 +419,7 @@ static t_type2ptr::iterator findType(t_type2ptr *pMap, const Type & rKey )
{
if (iter->first == rKey)
break;
- iter++;
+ ++iter;
}
return iter;
}
@@ -532,7 +532,7 @@ static t_long2ptr::iterator findLong(t_long2ptr *pMap, sal_Int32 nKey )
{
if (iter->first == nKey)
break;
- iter++;
+ ++iter;
}
return iter;
}
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index 7b1f4d3..82da5d7 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -738,7 +738,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc,)
}
}
- if (aReadOnlyRegistries.size() > 0 ||
+ if ((!aReadOnlyRegistries.empty()) ||
aReadWriteRegistry.getLength() > 0)
{
//#### create registry #############################################
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 3117cbb..f10472e 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -490,7 +490,7 @@ bool getJavaProps(const OUString & exePath,
props.push_back(std::make_pair(sKey, sVal));
}
- if (rs != FileHandleReader::RESULT_ERROR && props.size()>0)
+ if (rs != FileHandleReader::RESULT_ERROR && !props.empty())
ret = true;
//process error stream data
@@ -649,7 +649,7 @@ bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome)
void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
{
- if(vec.size() == 0)
+ if(vec.empty())
return;
int size= vec.size() - 1;
int cIter= 0;
@@ -694,7 +694,7 @@ void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
vec.at(j)= less;
}
}
- cIter++;
+ ++cIter;
}
}
@@ -1022,7 +1022,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
break;
}
- if (props.size() == 0)
+ if (props.empty())
return rtl::Reference<VendorBase>();
//find java.vendor property
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index f7beee1..b646f61 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -802,7 +802,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
if (plerr == JFW_PLUGIN_E_NONE)
{
//check if the vendor of the found JRE is supported
- if (vecVendors.size() == 0)
+ if (vecVendors.empty())
{
//vendor does not matter
*ppInfo = pInfo;
diff --git a/jvmfwk/source/libxmlutil.cxx b/jvmfwk/source/libxmlutil.cxx
index d44ff28..94c0afc 100644
--- a/jvmfwk/source/libxmlutil.cxx
+++ b/jvmfwk/source/libxmlutil.cxx
@@ -60,7 +60,7 @@ xmlXPathObject* CXPathObjectPtr::operator ->()
{
return _object;
}
-CXPathObjectPtr::operator xmlXPathObject*()
+CXPathObjectPtr::operator xmlXPathObject*() const
{
return _object;
}
@@ -92,7 +92,7 @@ xmlXPathContext* CXPathContextPtr::operator ->()
return _object;
}
-CXPathContextPtr::operator xmlXPathContext*()
+CXPathContextPtr::operator xmlXPathContext*() const
{
return _object;
}
@@ -124,7 +124,7 @@ xmlDoc* CXmlDocPtr::operator ->()
return _object;
}
-CXmlDocPtr::operator xmlDoc*()
+CXmlDocPtr::operator xmlDoc*() const
{
return _object;
}
@@ -159,7 +159,7 @@ CXmlCharPtr & CXmlCharPtr::operator = (xmlChar* pObj)
return *this;
}
-CXmlCharPtr::operator xmlChar*()
+CXmlCharPtr::operator xmlChar*() const
{
return _object;
}
diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/source/libxmlutil.hxx
index c102d6b..c1ac474 100644
--- a/jvmfwk/source/libxmlutil.hxx
+++ b/jvmfwk/source/libxmlutil.hxx
@@ -49,7 +49,7 @@ public:
*/
CXPathObjectPtr & operator = (xmlXPathObject* pObj);
xmlXPathObject* operator -> ();
- operator xmlXPathObject* ();
+ operator xmlXPathObject* () const;
};
//===========================================================
@@ -65,7 +65,7 @@ public:
CXPathContextPtr & operator = (xmlXPathContextPtr pObj);
~CXPathContextPtr();
xmlXPathContext* operator -> ();
- operator xmlXPathContext* ();
+ operator xmlXPathContext* () const;
};
//===========================================================
@@ -84,7 +84,7 @@ public:
CXmlDocPtr & operator = (xmlDoc* pObj);
~CXmlDocPtr();
xmlDoc* operator -> ();
- operator xmlDoc* ();
+ operator xmlDoc* () const;
};
//===========================================================
@@ -100,8 +100,7 @@ public:
CXmlCharPtr(const ::rtl::OUString &);
~CXmlCharPtr();
CXmlCharPtr & operator = (xmlChar* pObj);
-// xmlChar* operator -> ();
- operator xmlChar* ();
+ operator xmlChar* () const;
operator ::rtl::OUString ();
operator ::rtl::OString ();
};
More information about the Libreoffice-commits
mailing list