Article View: borland.public.cppbuilder.nativeapi
Article #4710Re: Code short circuit
From: PaoloItaly
Date: Wed, 07 Dec 2005 13:47
Date: Wed, 07 Dec 2005 13:47
23 lines
1409 bytes
1409 bytes
try
bool test;
windowProc()
{
switch (cmd & 0xFFF0)
{
case SC_MAXIMIZE:
case SC_RESTORE:
case SC_MINIMIZE:
case SC_MOVE:
case SC_SIZE:
test = true;
return;
default:
test = false;
break;
}
}
the compiler cannot know if yuo are using the global variable test in other
code, so
can't optimize
Technical Details
Message-ID:
<4396e818$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43961a6f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c4f5899a764a1e0 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "PaoloItaly" <paolot@FAKETHESPAMMERsirius-es.it> Newsgroups: borland.public.cppbuilder.nativeapi References: <43961a6f@newsgroups.borland.com> Subject: Re: Code short circuit Date: Wed, 7 Dec 2005 14:47:58 +0100 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 85.32.246.173 Message-ID: <4396e818$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133963288 85.32.246.173 (7 Dec 2005 05:48:08 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail