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

Commit bb8bce93 authored by Mikhail Lappo's avatar Mikhail Lappo
Browse files

Redundant checking of STL container element

As of C++ specification size_type erase( const key_type& key );
removes the element (if one exists). There is no need to perform
the check twice.

Change-Id: I4b057c08526abc7c2a483a60f9e166e4d8f56a74
parent 8524fadd
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1220,9 +1220,7 @@ static int PerformCommandFree(CommandParameters& params) {

    const std::string& id = params.tokens[params.cpos++];

    if (stash_map.find(id) != stash_map.end()) {
    stash_map.erase(id);
    }

    if (params.createdstash || params.canwrite) {
        return FreeStash(params.stashbase, id);