summaryrefslogtreecommitdiffstats
path: root/jvmfwk/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-27 15:28:09 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-27 15:30:58 +0200
commit3daf0c7e77a6438d11d23a31b5f21577c19cdcd8 (patch)
treec33f377c7e3f569018191dd4ca2cb26bbc59b3a5 /jvmfwk/source
parentMore loplugin:simplifybool (diff)
downloadcore-3daf0c7e77a6438d11d23a31b5f21577c19cdcd8.tar.gz
core-3daf0c7e77a6438d11d23a31b5f21577c19cdcd8.zip
More loplugin:simplifybool
Change-Id: I51e7a11149676a8b5396d9eb993a509859cdf725
Diffstat (limited to 'jvmfwk/source')
-rw-r--r--jvmfwk/source/elements.cxx6
-rw-r--r--jvmfwk/source/framework.cxx9
-rw-r--r--jvmfwk/source/fwkbase.cxx4
3 files changed, 9 insertions, 10 deletions
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 03269123c6d0..253ad0da123b 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -777,7 +777,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo)
bNil = false;
else
throw FrameworkException(JFW_E_ERROR, sExcMsg);
- if (bNil == true)
+ if (bNil)
return;
//Get javaInfo@manuallySelected attribute
@@ -890,7 +890,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc,
//javaInfo@autoSelect
xmlSetProp(pJavaInfoNode, reinterpret_cast<xmlChar const *>("autoSelect"),
- reinterpret_cast<xmlChar const *>(bAutoSelect == true ? "true" : "false"));
+ reinterpret_cast<xmlChar const *>(bAutoSelect ? "true" : "false"));
//Set xsi:nil in javaInfo element to false
//the xmlNs pointer must not be destroyed
@@ -977,7 +977,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc,
JavaInfo * CNodeJavaInfo::makeJavaInfo() const
{
- if (bNil == true || m_bEmptyNode == true)
+ if (bNil || m_bEmptyNode)
return NULL;
JavaInfo * pInfo = static_cast<JavaInfo*>(rtl_allocateMemory(sizeof(JavaInfo)));
if (pInfo == NULL)
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index e621e0e536b8..ddfc4bfbea55 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -276,8 +276,7 @@ javaFrameworkError SAL_CALL jfw_startVM(
//Check if the selected Java was set in this process. If so it
//must not have the requirments flag JFW_REQUIRE_NEEDRESTART
if ((aInfo->nRequirements & JFW_REQUIRE_NEEDRESTART)
- &&
- (jfw::wasJavaSelectedInSameProcess() == true))
+ && jfw::wasJavaSelectedInSameProcess())
return JFW_E_NEED_RESTART;
vmParams = settings.getVmParametersUtf8();
@@ -533,7 +532,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
jfw_freeJavaInfo(arInfos[j]);
rtl_freeMemory(arInfos);
- if (bInfoFound == true)
+ if (bInfoFound)
break;
//All Java installations found by the current plug-in lib
//do not provide the required features. Try the next plug-in
@@ -591,7 +590,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
}
}
}//end iterate over paths
- if (bInfoFound == true)
+ if (bInfoFound)
break;
}// end iterate plug-ins
}
@@ -837,7 +836,7 @@ javaFrameworkError SAL_CALL jfw_setEnabled(sal_Bool bEnabled)
if (jfw::getMode() == jfw::JFW_MODE_DIRECT)
return JFW_E_DIRECT_MODE;
- if (g_bEnabledSwitchedOn == false && bEnabled == sal_True)
+ if (!g_bEnabledSwitchedOn && bEnabled == sal_True)
{
//When the process started then Enabled was false.
//This is first time enabled is set to true.
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 871b96cb2267..9c79344496d8 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -418,7 +418,7 @@ JFW_MODE getMode()
static bool g_bMode = false;
static JFW_MODE g_mode = JFW_MODE_APPLICATION;
- if (g_bMode == false)
+ if (!g_bMode)
{
//check if either of the "direct mode" bootstrap variables is set
bool bDirectMode = true;
@@ -555,7 +555,7 @@ void setJavaSelected()
bool wasJavaSelectedInSameProcess()
{
//g_setJavaProcId not set means no Java selected
- if (g_bJavaSet == true)
+ if (g_bJavaSet)
return true;
return false;
}