It turned out that changing the token string member to a standard string did not require a lot of other changes. The string access functions were modified and the c_str function call was removed from the constructor initializers. The equality operator function was modified to use straight equality operator for case sensitivity comparison (REM, REM operator and string constants) and the new no case string equal function for case insensitive comparison.
In the rest of the code, the c_str function call was removed where a standard string was present, and the toStdString function call was removed from the token string access function where the result is put into a standard string or output in a standard output stream. In several places in the recreator functions, a c_str function call was added where a QString is needed (the c-style string returned is implicitly converted). Finally, one line in the translator using the QString::startsWith function with the case insensitive option was changed to convert the first character to upper case before comparing it (only the first character was being compared).
[branch token commit ee7b926daa]
Since there is no more work for the token class, the short-lived token branch was merged to the develop branch.
[branch develop merge commit ee12854e36]
Saturday, November 8, 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.)