Changes between Version 45 and Version 46 of MapGuideCodingStandards


Ignore:
Timestamp:
09/19/22 06:06:00 (2 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideCodingStandards

    v45 v46  
    708708}}}
    709709
    710 `auto` also has useful applications for primitive variable declarations as it can fix up to one half of any potential `data type mismatch` warnings as a result of declaring the variable with an incorrect (or insufficiently wide) type on the left-hand side of a variable assignment (think `size_t`/`int` indexing mismatches in for loops for an example)
    711 
    712 However, do not use `auto` as the return type (aka. return type deduction) in any public API method signature. We need to be as verbose and concise as possible for SWIG to generate the correct proxy classes.
     710`auto` also has useful applications for primitive variable declarations as it can fix up to one half of any potential `data type mismatch` warnings as a result of declaring the variable with an incorrect (or insufficiently wide/narrow) type on the left-hand side of a variable assignment (think `size_t`/`int` indexing mismatches in for loops for an example)
     711
     712However, do not use `auto` as the return type (aka. return type deduction) in any public API method signature. We need to be as verbose and concise as possible for SWIG to generate the correct proxy classes and their methods.
    713713
    714714==== for loops ====