aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp
diff options
context:
space:
mode:
authornalpp <nalpp@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit30d1ef3941e0dc835be7609de5ebee66958f215a (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/GetTheLights.cpp
parent87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb (diff)
downloadydb-30d1ef3941e0dc835be7609de5ebee66958f215a.tar.gz
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 2 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.cpp64
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 66f69a3b4b..6e78b546ab 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