Commit ca13e446 authored by Pavel Vainerman's avatar Pavel Vainerman

make style

parent 69a42967
......@@ -49,7 +49,6 @@ namespace uniset
void TOR::setIn( size_t num, long value )
{
// cout << getType() << "(" << myid << "): input " << num << " set " << state << endl;
for( auto&& it : ins )
{
if( it.num == num )
......
......@@ -823,7 +823,6 @@ namespace uniset
}
#endif
// ВНИМАНИЕ! Эта функция вызывается из основного eventLoop
// поэтому она должна быть максимально быстрой и безопасной
// иначе накроется весь обмен
......
......@@ -71,7 +71,6 @@ namespace uniset
std::shared_ptr<LogServer> logserv;
std::string logserv_host = {""};
int logserv_port = {0};
const std::string prefix = { "db" };
private:
......
......@@ -316,6 +316,9 @@ namespace uniset
CacheOfResolve rcache;
std::shared_ptr<uniset::ObjectIndex> oind;
std::shared_ptr<uniset::Configuration> uconf;
#ifndef DISABLE_REST_API
mutable UHttp::UHttpClient resolver;
#endif
};
// -------------------------------------------------------------------------
} // end of uniset namespace
......
......@@ -145,7 +145,7 @@ namespace uniset
type = Message::SysCommand;
this->priority = priority;
this->consumer = consumer;
memset(data,0,sizeof(data));
memset(data, 0, sizeof(data));
}
SystemMessage::SystemMessage(const VoidMessage* msg) noexcept:
......@@ -228,11 +228,12 @@ namespace uniset
}
//--------------------------------------------------------------------------------------------
TextMessage::TextMessage( const VoidMessage* vmsg ) noexcept
: VoidMessage(1) // dummy constructor
: VoidMessage(1) // dummy constructor
{
assert(vmsg->type == Message::TextMessage);
auto m = static_cast<const TextMessage*>(vmsg);
if( m )
{
type = m->type;
......@@ -252,11 +253,11 @@ namespace uniset
}
TextMessage::TextMessage(const char* msg,
int _mtype,
const uniset::Timespec& tm,
const ::uniset::ProducerInfo& pi,
Priority prior,
ObjectId cons) noexcept
int _mtype,
const uniset::Timespec& tm,
const ::uniset::ProducerInfo& pi,
Priority prior,
ObjectId cons) noexcept
{
type = Message::TextMessage;
this->node = pi.node;
......
......@@ -199,6 +199,7 @@ namespace uniset
return;
active = false;
if( termControl )
{
set_signals(false);
......
......@@ -37,7 +37,7 @@ using namespace uniset;
using namespace std;
// ------------------------------------------------------------------------------------------
// объект-функция для посылки сообщения менеджеру
class MPush: public unary_function< const std::shared_ptr<uniset::UniSetManager>& , bool>
class MPush: public unary_function< const std::shared_ptr<uniset::UniSetManager>&, bool>
{
public:
explicit MPush(const uniset::TransportMessage& msg): msg(msg) {}
......@@ -63,7 +63,7 @@ class MPush: public unary_function< const std::shared_ptr<uniset::UniSetManager>
};
// объект-функция для посылки сообщения объекту
class OPush: public unary_function< const std::shared_ptr<uniset::UniSetObject>& , bool>
class OPush: public unary_function< const std::shared_ptr<uniset::UniSetObject>&, bool>
{
public:
explicit OPush(const uniset::TransportMessage& msg): msg(msg) {}
......@@ -464,7 +464,7 @@ const std::shared_ptr<UniSetObject> UniSetManager::findObject( const string& nam
{
uniset_rwmutex_rlock lock(olistMutex);
for( auto && o : olist )
for( auto&& o : olist )
{
if( o->getName() == name )
return o;
......@@ -477,7 +477,7 @@ const std::shared_ptr<UniSetManager> UniSetManager::findManager( const string& n
{
uniset_rwmutex_rlock lock(mlistMutex);
for( auto && m : mlist )
for( auto&& m : mlist )
{
if( m->getName() == name )
return m;
......
......@@ -401,11 +401,11 @@ namespace uniset
}
// ------------------------------------------------------------------------------------------
void UniSetObject::pushMessage(const char* msg,
::CORBA::Long mtype,
const ::uniset::Timespec& tm,
const ::uniset::ProducerInfo& pi,
::CORBA::Long priority,
::CORBA::Long consumer )
::CORBA::Long mtype,
const ::uniset::Timespec& tm,
const ::uniset::ProducerInfo& pi,
::CORBA::Long priority,
::CORBA::Long consumer )
{
uniset::TextMessage tmsg(msg, mtype, tm, pi, (uniset::Message::Priority)priority, consumer);
auto vm = tmsg.toLocalVoidMessage();
......
......@@ -61,7 +61,7 @@ float uniset::fcalibrate( float raw, float rawMin, float rawMax,
}
// -----------------------------------------------------------------------------
double uniset::dcalibrate( double raw, double rawMin, double rawMax,
double calMin, double calMax, bool limit )
double calMin, double calMax, bool limit )
{
if( rawMax == rawMin ) return 0; // деление на 0!!!
......
......@@ -97,6 +97,7 @@ TEST_CASE("UniXML::iterator", "[unixml][iterator][basic]" )
--it;
CHECK( it.getName() == "UserData" );
UniXML::iterator it_bad = uxml.begin();
REQUIRE_FALSE( it_bad.findName("UnknownNode", "NOTFOUND") );
REQUIRE_FALSE( !it_bad );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment