To end the initial C++11 transition, a few additional minor changes were made though there were many of them. These included:
- Replacing all uses of the untyped NULL macro with the C++11 nullptr typed null pointer.
- Replacing tests against the untyped NULL macro with testing the pointer directly as described recently (though for QString instances, the isNull() function was required to check if the instance contained a null string, which is not the same as an empty string).
- Replacing unnamed enumerators to define integer constants with C++11 constexpr statements.
- Removing empty constructors and destructors (the compiler generates these by default).
- Moving empty constructors that have only member initializations to the header file.
- Removing unnecessary include statements (to no longer used Qt classes).
- Changing to the C++11 universal initializer list syntax throughout (except for when a specific constructor needs to be called, like giving a size to a container, or with a reference variable, which is apparently not allowed to be initialized this way).
[branch cpp11 commit 299f71ab5c]
[branch develop merge commit 53175d69b5]
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)