summaryrefslogtreecommitdiffstats
path: root/doc/html/tutorial1-12.html
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-30 14:27:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-06-25 16:43:08 +0900
commit35ced32e331ee29fda1642616c803637952f5b22 (patch)
treeda44726777f814e19c7ef1e43854f6a1693dd6fb /doc/html/tutorial1-12.html
parent7dd4848d61e4c52091d6c644356c84c67536bde2 (diff)
downloadtqt-35ced32e.tar.gz
tqt-35ced32e.zip
Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit a7f1e6e2552d9cdbb3d76bff089db522248b9a24)
Diffstat (limited to 'doc/html/tutorial1-12.html')
-rw-r--r--doc/html/tutorial1-12.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/html/tutorial1-12.html b/doc/html/tutorial1-12.html
index 387e594de..34a6bd07a 100644
--- a/doc/html/tutorial1-12.html
+++ b/doc/html/tutorial1-12.html
@@ -186,9 +186,9 @@ widget is invisible. TQt guarantees that no harm is done when calling
repaint() on a hidden widget.
<p> <pre> void CannonField::newTarget()
{
- static bool first_time = TRUE;
+ static bool first_time = true;
if ( first_time ) {
- first_time = FALSE;
+ first_time = false;
<a href="qtime.html">TQTime</a> midnight( 0, 0, 0 );
<a name="x2399"></a><a name="x2398"></a> srand( midnight.<a href="qtime.html#secsTo">secsTo</a>(TQTime::<a href="qtime.html#currentTime">currentTime</a>()) );
}
@@ -210,7 +210,7 @@ passed since midnight as a pseudo-random value.
<p> First we create a static bool local variable. A static variable like
this one is guaranteed to keep its value between calls to the function.
<p> The <tt>if</tt> test will succeed only the first time this function is called
-because we set <tt>first_time</tt> to FALSE inside the <tt>if</tt> block.
+because we set <tt>first_time</tt> to false inside the <tt>if</tt> block.
<p> Then we create the <a href="qtime.html">TQTime</a> object <tt>midnight</tt>, which represents the time
00:00:00. Next we fetch the number of seconds from midnight until
now and use it as a random seed. See the documentation for <a href="qdate.html">TQDate</a>,