Tuesday, December 2, 2014

Miscellaneous Minor Changes

A bunch of miscellaneous minor changes have been accumulating during this topic branch that were finally taken care of, which included:
  • Adding the C++11 override keyword to functions in derived dictionary information classes that implement virtual function from the base abstract dictionary class.
  • Changing the dictionary information array functions to return a reference to the vector instead of a pointer to the array contained within the vector.  The pointer to the array was originally returned as it was thought would allow more efficient access to the array elements during runtime, but the vector bracket operator should essentially be the same.
  • Adding the noexcept keyword to all parser functions that don't throw exceptions.
  • Replacing several Qt forever macros with an empty for (to remove dependency on the Qt header files).
  • Removing two c_str function calls from recreator functions that were previously missed (these were originally added to work with QString, but were later replaced with standard strings).
  • Correcting some minor code formatting issues.
  • Removing two unused table search functions.
  • Changing two newline '\n' character outputs in tester class functions to std::endl, which outputs the newline character plus flushes the output stream.  This was helpful during debugging to know which input line was being processed when some sort of crash occurred (otherwise the output was still in a buffer in memory making it difficult to know which line it was on).
  • Changing the header argument of the tester translate input function from a constant C-style character string to an rvalue reference to a standard string.  An rvalue reference requires a temporary value, which is what is provided by calls to this function that don't use the blank string default.
  • Assigning the underlying to the sub-code enumeration to an unsigned 16-bit integer (uint16_t), something possible by C++11.  The enumerator values were changed to unsigned 16-bit values (where the four leading zero digits were removed).
[branch misc-cpp-stl commit 69ae2f0b15]

This concludes this development topic and the misc-cpp-stl branch was merged to the develop branch and deleted.  The Table class is the only remaining class that has not been transitioned from Qt to the STL and will also be reimplemented for better C++ utilization.

[branch develop merge commit 7f303f1bb1]