Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f129e84a authored by Bernhard Rosenkraenzer's avatar Bernhard Rosenkraenzer
Browse files

Fix comparison of String8 to char* literal



Clang (correctly) interprets

if ("." == sName)

as

if ("." == (const char*)sName)

and recognizes that comparing the pointers isn't what was meant.

With

if (sName == ".")

both clang and gcc see and use String8::operator==(const char *),
ensuring we get the wanted behavior.

Change-Id: Ide240e13214a56f6899f72de3db75dac647e6d4b
Signed-off-by: default avatarBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
parent 14fc930d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment