1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -16,9 +16,9 @@
MA 02110-1301, USA. */
/*******************************************************************************
* $Id$
*
*******************************************************************************/
* $Id$
*
*******************************************************************************/
/*
* Observer.cpp
@ -31,77 +31,71 @@
#include "we_observer.h"
namespace WriteEngine
{
//-----------------------------------------------------------------------------
// ctor
Observer::Observer()
{
}
//-----------------------------------------------------------------------------
//dtor
// dtor
Observer::~Observer()
{
//
//
}
//-----------------------------------------------------------------------------
//ctor
// ctor
Subject::Subject()
{
}
//-----------------------------------------------------------------------------
//dtor
// dtor
Subject::~Subject()
{
}
//-----------------------------------------------------------------------------
void Subject::attach(Observer* Obs)
{
boost::mutex::scoped_lock aLstLock;
fObs.push_back(Obs);
boost::mutex::scoped_lock aLstLock;
fObs.push_back(Obs);
}
//-----------------------------------------------------------------------------
void Subject::detach(Observer* Obs)
{
boost::mutex::scoped_lock aLstLock;
Observers::iterator aIt = fObs.begin();
boost::mutex::scoped_lock aLstLock;
Observers::iterator aIt = fObs.begin();
while (aIt != fObs.end())
while (aIt != fObs.end())
{
if ((*aIt) == Obs)
{
if ((*aIt) == Obs)
{
fObs.erase(aIt);
break;
}
fObs.erase(aIt);
break;
}
}
}
//-----------------------------------------------------------------------------
void Subject::notify()
{
boost::mutex::scoped_lock aLstLock;
Observers::iterator aIt = fObs.begin();
boost::mutex::scoped_lock aLstLock;
Observers::iterator aIt = fObs.begin();
while (aIt != fObs.end())
{
(*aIt)->update(this);
}
while (aIt != fObs.end())
{
(*aIt)->update(this);
}
}
//-----------------------------------------------------------------------------
}// namespace WriteEngine
} // namespace WriteEngine