diff options
author | nalpp <nalpp@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
commit | 87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb (patch) | |
tree | f4ab0734eecf35b22f21952d1aa15496f267a6a3 /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp | |
parent | 198698b9c1e18958addc9682fbfba4576d604757 (diff) | |
download | ydb-87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb.tar.gz |
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp')
-rw-r--r-- | contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp index 6e78b546ab..66f69a3b4b 100644 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp +++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp @@ -2,35 +2,35 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ -#include <aws/core/utils/GetTheLights.h> -#include <cassert> - -namespace Aws -{ - namespace Utils - { - GetTheLights::GetTheLights() : m_value(0) - { - } - - void GetTheLights::EnterRoom(std::function<void()> &&callable) - { - int cpy = ++m_value; - assert(cpy > 0); - if(cpy == 1) - { - callable(); - } - } - - void GetTheLights::LeaveRoom(std::function<void()> &&callable) - { - int cpy = --m_value; - assert(cpy >= 0); - if(cpy == 0) - { - callable(); - } - } - } -}
\ No newline at end of file +#include <aws/core/utils/GetTheLights.h> +#include <cassert> + +namespace Aws +{ + namespace Utils + { + GetTheLights::GetTheLights() : m_value(0) + { + } + + void GetTheLights::EnterRoom(std::function<void()> &&callable) + { + int cpy = ++m_value; + assert(cpy > 0); + if(cpy == 1) + { + callable(); + } + } + + void GetTheLights::LeaveRoom(std::function<void()> &&callable) + { + int cpy = --m_value; + assert(cpy >= 0); + if(cpy == 0) + { + callable(); + } + } + } +}
\ No newline at end of file |