diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-6C1E4B3D-0FBF-5CEA-9A30-B4C5CB4CAC3E.dita --- a/Symbian3/PDK/Source/GUID-6C1E4B3D-0FBF-5CEA-9A30-B4C5CB4CAC3E.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-6C1E4B3D-0FBF-5CEA-9A30-B4C5CB4CAC3E.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,38 +1,38 @@ - - - - - -Coding -literal descriptorsLiteral descriptors must be defined in their own C++ statement -and the resulting constant used wherever it is required. -

Literal descriptors cannot be embedded in expressions because they do -not create temporary objects.

-

Literal objects can be declared safely in header files:

- -

Literals can be defined at file-scope, including in header files, in which -case they are visible to any code that follows. They can also be declared -local to the function which uses them. However, there are a couple of caveats -with defining them at function scope:

- -

Thus, if the descriptor is short or used only in an inline function, it -is better to define it at file scope with a suitably distinct name.

+ + + + + +Coding +literal descriptorsLiteral descriptors must be defined in their own C++ statement +and the resulting constant used wherever it is required. +

Literal descriptors cannot be embedded in expressions because they do +not create temporary objects.

+

Literal objects can be declared safely in header files:

+
    +
  • without requiring writable +data

  • +
  • without creating a copy +of the data in every module that includes the header.

  • +
+

Literals can be defined at file-scope, including in header files, in which +case they are visible to any code that follows. They can also be declared +local to the function which uses them. However, there are a couple of caveats +with defining them at function scope:

+
    +
  • For very short strings, +of the order of 3 ASCII characters or 1 UNICODE character, it is more efficient +to declare the literals at file scope.

  • +
  • Literal descriptors +defined in inline functions are laid down in every single compilation +module that includes the header file.

  • +
+

Thus, if the descriptor is short or used only in an inline function, it +is better to define it at file scope with a suitably distinct name.

\ No newline at end of file