VirtualBox

Changeset 44115 in vbox


Ignore:
Timestamp:
Dec 13, 2012 10:59:40 AM (12 years ago)
Author:
vboxsync
Message:

VBox-CodingGuidelines.cpp: Some clarifications + cx/cy and x,y,z.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/VBox-CodingGuidelines.cpp

    r30954 r44115  
    272272 *        vertical space on debug logging).
    273273 *
    274  *      - Comments should try stay within the usual 80 columns.
     274 *      - Comments should try stay within the usual 80 columns as these are
     275 *        denser and too long lines may be harder to read.
    275276 *
    276277 *      - Curly brackets are not indented.  Example:
     
    402403 * @subsection sec_vbox_guideline_optional_prefix   Variable / Member Prefixes
    403404 *
     405 * Prefixes are meant to provide extra context clues to a variable/member, we
     406 * therefore avoid using prefixes that just indicating the type if a better
     407 * choice is available.
     408 *
     409 *
     410 * The prefixes:
     411 *
    404412 *      - The 'g_' (or 'g') prefix means a global variable, either on file or module level.
    405413 *
     
    435443 *        count of bytes in block.
    436444 *
     445 *      - The 'cx' prefix means width (count of 'x' units).
     446 *
     447 *      - The 'cy' prefix means height (count of 'y' units).
     448 *
     449 *      - The 'x', 'y' and 'z' prefix refers to the x-, y- , and z-axis
     450 *        respectively.
     451 *
    437452 *      - The 'off' prefix means offset.
    438453 *
     
    441456 *
    442457 *      - The 'i[1-9]+' prefix means a fixed bit size variable.  Frequently
    443  *        used with the int[1-9]+_t types.  [type]
     458 *        used with the int[1-9]+_t types where the width is really important.
     459 *        In most cases 'i' is more appropriate.  [type]
    444460 *
    445461 *      - The 'e' (or 'enm') prefix means enum.
     
    448464 *
    449465 *      - The 'u[1-9]+' prefix means a fixed bit size variable.  Frequently
    450  *        used with the uint[1-9]+_t types and with bitfields.  [type]
     466 *        used with the uint[1-9]+_t types and with bitfields where the width is
     467 *        really important.  In most cases 'u' or 'b' (byte) would be more
     468 *        appropriate.  [type]
    451469 *
    452470 *      - The 'b' prefix means byte or bytes.  [type]
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette