From 382cd1c45e4d6d9cb635647c902fa671d3788a09 Mon Sep 17 00:00:00 2001 From: brodsom Date: Mon, 8 Sep 2003 01:45:09 +0000 Subject: [PATCH] Code cleaning --- src/iscguard/iscguard.cpp | 3 +-- src/isql/isql.epp | 4 ++-- src/jrd/exe.cpp | 2 +- src/jrd/opt.cpp | 2 +- src/jrd/os/win32/thd_priority.cpp | 2 +- src/remote/os/win32/chop.cpp | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/iscguard/iscguard.cpp b/src/iscguard/iscguard.cpp index 143a35b5cd..d15c66041a 100644 --- a/src/iscguard/iscguard.cpp +++ b/src/iscguard/iscguard.cpp @@ -122,8 +122,7 @@ int WINAPI WinMain( GetVersionEx((LPOSVERSIONINFO) & OsVersionInfo); /* service_flag is TRUE for NT false for 95 */ - service_flag = ((OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) - ? true : false); + service_flag = (OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT); if (service_flag == true) service_flag = parse_args(lpszCmdLine, &service_flag); diff --git a/src/isql/isql.epp b/src/isql/isql.epp index 249e28bd0c..57ee9a2195 100644 --- a/src/isql/isql.epp +++ b/src/isql/isql.epp @@ -24,7 +24,7 @@ * */ /* - $Id: isql.epp,v 1.40 2003-09-05 11:25:53 brodsom Exp $ + $Id: isql.epp,v 1.41 2003-09-08 01:43:03 brodsom Exp $ Revision 1.5 2000/11/18 16:49:24 fsg Increased PRINT_BUFFER_LENGTH to 2048 to show larger plans Fixed Bug #122563 in extract.e get_procedure_args @@ -6079,7 +6079,7 @@ static void print_item_numeric(SINT64 value, **************************************/ SSHORT from, to; bool all_digits_used = false; - bool neg = (value < 0) ? true : false; + bool neg = (value < 0); /* Handle special case of no negative scale, no '.' required! */ if (scale >= 0) { diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index 48948e3d7e..1474746450 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -2478,7 +2478,7 @@ static JRD_NOD looper(TDBB tdbb, JRD_REQ request, JRD_NOD in_node) switch (request->req_operation) { case jrd_req::req_evaluate: impure->Open(tdbb, node->nod_arg[0], node->nod_count - 2, - node->nod_arg[1] ? false : true); + (!node->nod_arg[1])); case jrd_req::req_return: case jrd_req::req_sync: if (impure->Fetch(tdbb, &node->nod_arg[2])) { diff --git a/src/jrd/opt.cpp b/src/jrd/opt.cpp index e9da09d3d5..2a2ddba644 100644 --- a/src/jrd/opt.cpp +++ b/src/jrd/opt.cpp @@ -606,7 +606,7 @@ RSB OPT_compile(TDBB tdbb, rsb = gen_outer(tdbb, opt_, rse, rivers_stack, &sort, &project); } else { - bool sort_present = (sort) ? true : false; + bool sort_present = (sort); bool outer_rivers = false; JRD_NOD saved_sort_node = sort; diff --git a/src/jrd/os/win32/thd_priority.cpp b/src/jrd/os/win32/thd_priority.cpp index 75ae5195de..bda9995ecf 100644 --- a/src/jrd/os/win32/thd_priority.cpp +++ b/src/jrd/os/win32/thd_priority.cpp @@ -225,7 +225,7 @@ void ThreadPriorityScheduler::Exit(void) { // Check whether current thread has high priority // bool ThreadPriorityScheduler::Boosted(void) { - return InternalGet()->flags & THPS_BOOSTED ? true : false; + return (InternalGet()->flags & THPS_BOOSTED); } //____________________________________________________________ diff --git a/src/remote/os/win32/chop.cpp b/src/remote/os/win32/chop.cpp index b2e92c19e1..17d04e7502 100644 --- a/src/remote/os/win32/chop.cpp +++ b/src/remote/os/win32/chop.cpp @@ -101,7 +101,7 @@ char *ChopFileName( char *szName, char *szShortName, ULONG dwLen) else pchLastRight = pchRight; } - bLeft = bLeft ? false : true; + bLeft = !bLeft; } for (pchTmp = szShortName, pchLeft = szName;