The 'empty()' method is more efficient for checking if a string is empty compared to comparing it with an empty string literal.
The default constructor 'std::wstring()' is more efficient for creating an empty string compared to using a string literal.
The 'clear()' method is more efficient for clearing a std::wstring compared to assigning it an empty string literal.
Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
Replaced 'at()' method with 'operator[]' to improve performance.
The 'at()' method performs bounds checking, which can introduce overhead. Using 'operator[]' bypasses this check and can improve performance when you are certain that the index is within bounds.
Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
The 'empty()' method is more efficient for checking if a string is empty compared to comparing it with an empty string literal.
The default constructor 'std::wstring()' is more efficient for creating an empty string compared to using a string literal.
The 'clear()' method is more efficient for clearing a std::wstring compared to assigning it an empty string literal.
Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
Replaced 'at()' method with 'operator[]' to improve performance.
The 'at()' method performs bounds checking, which can introduce overhead. Using 'operator[]' bypasses this check and can improve performance when you are certain that the index is within bounds.
Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>