Commit 562f305e authored by Nikita Baryshnikov's avatar Nikita Baryshnikov

Coding style: note for static declarations

Change-Id: I2736f017e412459270c632a6e021db2edb3b6ab7
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 5163bfb5
......@@ -1005,6 +1005,11 @@
};
\endcode
\li Stick to integral types, arrays of integral types, and structs thereof
for static declarations in headers.
For example, \c {static float i[SIZE_CONSTANT];} will not be optimized
and copied in every plugin in most cases, it would be good to avoid it.
\li Anything that has a constructor or needs to run code to be
initialized cannot be used as global object in library code,
since it is undefined when that constructor or code will be run
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment