272
edits
m (→Endianness issues: endianess > endianness) |
Dreammaster (talk | contribs) (Mention the new STL thunks) |
||
Line 12: | Line 12: | ||
* C++ exceptions (throw/catch): Not all C++ compilers support these correctly (esp. on embedded systems), and exception support incurs a noticeable overhead in binary size. | * C++ exceptions (throw/catch): Not all C++ compilers support these correctly (esp. on embedded systems), and exception support incurs a noticeable overhead in binary size. | ||
* Global C++ objects: Their constructors / destructors will not be called on certain targets, causing all kinds of bad problems and requiring ugly workarounds. (The GCC option -Wglobal-constructors helps finding code doing this.) | * Global C++ objects: Their constructors / destructors will not be called on certain targets, causing all kinds of bad problems and requiring ugly workarounds. (The GCC option -Wglobal-constructors helps finding code doing this.) | ||
* We implement wrappers for a subset of the Standard Template Library (STL) in common/std/, which internally use ScummVM classes. You simply need to include the appropriate file, and use Std:: rather than std:: as the namespace. Note that these should only be used when porting existing codebases already using the STL. For developing entirely new engines from scratch, you need to use the classes in /common/ directly. | |||
We are reviewing these decisions from time to time, but so far, in our estimation the drawbacks of using any of these outweigh the hypothetical advantages. | We are reviewing these decisions from time to time, but so far, in our estimation the drawbacks of using any of these outweigh the hypothetical advantages. |
edits