27 lines
480 B
Plaintext
27 lines
480 B
Plaintext
Indenting preprocessor directives reduces the code readability, because it make preprocessor directives harder to spot.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
void optimal()
|
|
{
|
|
#if INTEL /* Noncompliant - hard to spot */
|
|
specificIntelStuff();
|
|
#endif /* Noncompliant - hard to spot */
|
|
}
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
void optimal()
|
|
{
|
|
#if INTEL /* Compliant */
|
|
specificIntelStuff();
|
|
#endif /* Compliant */
|
|
}
|
|
----
|
|
|