summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d /basctl
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/scriptdocument.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 8e3b0ac984ca..c7bbb9fbf968 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -215,7 +215,7 @@ namespace basctl
inline bool isValid() const { return m_bValid; }
/** determines whether the instance refers to a non-closed document
*/
- inline bool isAlive() const { return m_bValid ? ( m_bIsApplication ? true : !m_bDocumentClosed ) : false; }
+ inline bool isAlive() const { return m_bValid && ( m_bIsApplication || !m_bDocumentClosed ); }
/// determines whether the "document" refers to the application in real
inline bool isApplication() const { return m_bValid && m_bIsApplication; }
/// determines whether the document refers to a real document (instead of the application)