Skip to content

Commit

Permalink
[refactor]: variable naming
Browse files Browse the repository at this point in the history
  • Loading branch information
sanam2405 committed Feb 12, 2024
1 parent 071c21a commit d915fe2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace caches
void Put(const Key& key, const Value& value) noexcept
{
operation_guard lock{safe_operation};
auto element_iterator = FindElem(key);
auto element_iterator = findElement(key);

if (element_iterator == cache_items_map.end())
{
Expand Down Expand Up @@ -125,7 +125,7 @@ namespace caches
bool Cached(const Key& key) const noexcept
{
operation_guard lock{safe_operation};
return FindElem(key) != cache_items_map.cend();
return findElement(key) != cache_items_map.cend();
}

/*
Expand All @@ -148,7 +148,7 @@ namespace caches
{
operation_guard lock{safe_operation};

auto element = FindElem(key);
auto element = findElement(key);

if (element == cache_items_map.end())
{
Expand Down Expand Up @@ -190,7 +190,7 @@ namespace caches

void Erase(const Key& key)
{
auto element_iterator = FindElem(key);
auto element_iterator = findElement(key);

Erase(element_iterator);
}
Expand All @@ -201,11 +201,11 @@ namespace caches
cache_items_map[key] = value;
}

const_iterator FindElem(const Key& key) const { return cache_items_map.find(key); }
const_iterator findElement(const Key& key) const { return cache_items_map.find(key); }

std::pair<const_iterator, bool> GetInternal(const Key& key) const noexcept
{
auto element_iterator = FindElem(key);
auto element_iterator = findElement(key);

if (element_iterator != end())
{
Expand Down

0 comments on commit d915fe2

Please sign in to comment.