To complete the transition of the program model to the STL, all of the strings were changed to standard strings. This included the return value of the line text function, the text member of the line info structure, and an argument of the update line function (where an rvalue reference was used since the caller no longer needs the string passed so it is moved to the function).
The QStringList argument of the update function was changed to a std::vector<std::string> (the STL has no string list class) rvalue reference type (the caller no longer needs the vector passed so it can be moved to the update function). The update function was defined as a public slot, but was no longer being used as a slot, so it was changed to a regular public function.
All callers to the modified functions were modified accordingly. This included the translate function of the translator where its input argument was already being converted to a standard string to pass to the parser constructor. There were four functions that put function pointers into a temporary variable. These were changed to if-statement scoped variables using the auto type for convenience. This concludes work on the program model.
[branch misc-cpp-stl commit 2f7a0bb119]
Saturday, November 15, 2014
Subscribe to:
Post Comments (Atom)
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.)