diff options
author | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-10-27 10:02:03 +0100 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-10-27 10:02:03 +0100 |
commit | 89720d3c63bbd22cbccc80cdc92c2f2dd20193ba (patch) | |
tree | 591c45dba85c98fdd8e141827bdb6e82aaad4f59 /src/CommonAPI/ContainerUtils.cpp | |
parent | 99ebf3461f51e4899f06457d6aafdaa4adecd278 (diff) | |
download | genivi-common-api-runtime-master.tar.gz |
Diffstat (limited to 'src/CommonAPI/ContainerUtils.cpp')
-rw-r--r-- | src/CommonAPI/ContainerUtils.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/CommonAPI/ContainerUtils.cpp b/src/CommonAPI/ContainerUtils.cpp index 71876bd..201e251 100644 --- a/src/CommonAPI/ContainerUtils.cpp +++ b/src/CommonAPI/ContainerUtils.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2020 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -8,20 +8,23 @@ namespace CommonAPI { -size_t SharedPointerClientIdContentHash::operator()(const std::shared_ptr<ClientId>& t) const { - if (t) { - return t->hashCode(); - } else { - return 0; +size_t +SharedPointerClientIdContentHash::operator()(const std::shared_ptr<ClientId> &_t) const { + if (_t) { + return _t->hashCode(); } + + return (0); } -bool SharedPointerClientIdContentEqual::operator()(const std::shared_ptr<ClientId>& a, const std::shared_ptr<ClientId>& b) const { - if (a && b) { - return *a==*b; - } else { - return false; +bool +SharedPointerClientIdContentEqual::operator()( + const std::shared_ptr<ClientId> &_lhs, const std::shared_ptr<ClientId> &_rhs) const { + if (_lhs && _rhs) { + return (*_lhs==*_rhs); } + + return (false); } } // namespace std |