20 lines
261 B
Plaintext
20 lines
261 B
Plaintext
![]() |
include::../description.adoc[]
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
if (GetTrue() | GetFalse()) // Noncompliant; both sides evaluated
|
||
|
{
|
||
|
}
|
||
|
----
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
----
|
||
|
if (GetTrue() || GetFalse()) // true short-circuit logic
|
||
|
{
|
||
|
}
|
||
|
----
|
||
|
|
||
|
include::../see.adoc[]
|