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

Commit 1aaef320 authored by Harry Cutts's avatar Harry Cutts
Browse files

PropertyProvider: remove unnecessary string copy

Change-Id: I38ffe0b5dd175baf037a11d5412e2f14eb24ec46
Test: atest inputflinger_test
Bug: 245989146
Flag: EXEMPT refactor
parent a32a1198
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ void PropertyProvider::loadPropertiesFromIdcFile(const PropertyMap& idcPropertie
    // prefixed with "gestureProp." and have spaces replaced by underscores. So, for example, the
    // configuration key "gestureProp.Palm_Width" refers to the "Palm Width" property.
    const std::string gesturePropPrefix = "gestureProp.";
    for (const std::string key : idcProperties.getKeysWithPrefix(gesturePropPrefix)) {
    for (const std::string& key : idcProperties.getKeysWithPrefix(gesturePropPrefix)) {
        std::string propertyName = key.substr(gesturePropPrefix.length());
        for (size_t i = 0; i < propertyName.length(); i++) {
            if (propertyName[i] == '_') {