Since there were a number standard string to c-style string conversions to convert to a QString in the recreator functions, the Recreator class is next to be transitioned to the STL. This was started by changing the separator member from QChar to char along with its access functions. An initializer for the separator member was added since the plain char type does not have a default constructor like the QChar class.
Two uses of the separator access function that required special handling. These were in the input assign recreate and assign string recreate functions. Previously the separator was added to other literal character constants. Now that the separator is the plain char type, the compiler will treat the plus operator as addition instead of concatenation. The separator is temporarily converted to a QChar so that the plus gets compiled as string concatenation instead of character addition.
[branch recreator commit 3b5b789198]
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.)