From 5fb66ae5595b7435e8954df31473fad15a74b8c2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 18 Oct 2018 08:27:05 +0200 Subject: clang-tidy readability-simplify-boolean-expr Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin --- dbaccess/source/filter/hsqldb/createparser.cxx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx b/dbaccess/source/filter/hsqldb/createparser.cxx index d8a3fdb583f3..0588b641a04f 100644 --- a/dbaccess/source/filter/hsqldb/createparser.cxx +++ b/dbaccess/source/filter/hsqldb/createparser.cxx @@ -127,23 +127,9 @@ OUString lcl_getDefaultValue(const OUString& sColumnDef) return OUString{}; } -bool lcl_isNullable(const OUString& sColumnDef) -{ - if (sColumnDef.indexOf("NOT NULL") >= 0) - { - return false; - } - return true; -} +bool lcl_isNullable(const OUString& sColumnDef) { return sColumnDef.indexOf("NOT NULL") < 0; } -bool lcl_isPrimaryKey(const OUString& sColumnDef) -{ - if (sColumnDef.indexOf("PRIMARY KEY") >= 0) - { - return true; - } - return false; -} +bool lcl_isPrimaryKey(const OUString& sColumnDef) { return sColumnDef.indexOf("PRIMARY KEY") >= 0; } sal_Int32 lcl_getDataTypeFromHsql(const OUString& sTypeName) { -- cgit