Commit ca13e446 authored by Pavel Vainerman's avatar Pavel Vainerman

make style

parent 69a42967
...@@ -49,7 +49,6 @@ namespace uniset ...@@ -49,7 +49,6 @@ namespace uniset
void TOR::setIn( size_t num, long value ) void TOR::setIn( size_t num, long value )
{ {
// cout << getType() << "(" << myid << "): input " << num << " set " << state << endl; // cout << getType() << "(" << myid << "): input " << num << " set " << state << endl;
for( auto&& it : ins ) for( auto&& it : ins )
{ {
if( it.num == num ) if( it.num == num )
......
...@@ -823,7 +823,6 @@ namespace uniset ...@@ -823,7 +823,6 @@ namespace uniset
} }
#endif #endif
// ВНИМАНИЕ! Эта функция вызывается из основного eventLoop // ВНИМАНИЕ! Эта функция вызывается из основного eventLoop
// поэтому она должна быть максимально быстрой и безопасной // поэтому она должна быть максимально быстрой и безопасной
// иначе накроется весь обмен // иначе накроется весь обмен
......
...@@ -71,7 +71,6 @@ namespace uniset ...@@ -71,7 +71,6 @@ namespace uniset
std::shared_ptr<LogServer> logserv; std::shared_ptr<LogServer> logserv;
std::string logserv_host = {""}; std::string logserv_host = {""};
int logserv_port = {0}; int logserv_port = {0};
const std::string prefix = { "db" }; const std::string prefix = { "db" };
private: private:
......
...@@ -316,6 +316,9 @@ namespace uniset ...@@ -316,6 +316,9 @@ namespace uniset
CacheOfResolve rcache; CacheOfResolve rcache;
std::shared_ptr<uniset::ObjectIndex> oind; std::shared_ptr<uniset::ObjectIndex> oind;
std::shared_ptr<uniset::Configuration> uconf; std::shared_ptr<uniset::Configuration> uconf;
#ifndef DISABLE_REST_API
mutable UHttp::UHttpClient resolver;
#endif
}; };
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
} // end of uniset namespace } // end of uniset namespace
......
...@@ -145,7 +145,7 @@ namespace uniset ...@@ -145,7 +145,7 @@ namespace uniset
type = Message::SysCommand; type = Message::SysCommand;
this->priority = priority; this->priority = priority;
this->consumer = consumer; this->consumer = consumer;
memset(data,0,sizeof(data)); memset(data, 0, sizeof(data));
} }
SystemMessage::SystemMessage(const VoidMessage* msg) noexcept: SystemMessage::SystemMessage(const VoidMessage* msg) noexcept:
...@@ -233,6 +233,7 @@ namespace uniset ...@@ -233,6 +233,7 @@ namespace uniset
assert(vmsg->type == Message::TextMessage); assert(vmsg->type == Message::TextMessage);
auto m = static_cast<const TextMessage*>(vmsg); auto m = static_cast<const TextMessage*>(vmsg);
if( m ) if( m )
{ {
type = m->type; type = m->type;
......
...@@ -199,6 +199,7 @@ namespace uniset ...@@ -199,6 +199,7 @@ namespace uniset
return; return;
active = false; active = false;
if( termControl ) if( termControl )
{ {
set_signals(false); set_signals(false);
......
...@@ -37,7 +37,7 @@ using namespace uniset; ...@@ -37,7 +37,7 @@ using namespace uniset;
using namespace std; 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: public:
explicit MPush(const uniset::TransportMessage& msg): msg(msg) {} explicit MPush(const uniset::TransportMessage& msg): msg(msg) {}
...@@ -63,7 +63,7 @@ class MPush: public unary_function< const std::shared_ptr<uniset::UniSetManager> ...@@ -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: public:
explicit OPush(const uniset::TransportMessage& msg): msg(msg) {} explicit OPush(const uniset::TransportMessage& msg): msg(msg) {}
...@@ -464,7 +464,7 @@ const std::shared_ptr<UniSetObject> UniSetManager::findObject( const string& nam ...@@ -464,7 +464,7 @@ const std::shared_ptr<UniSetObject> UniSetManager::findObject( const string& nam
{ {
uniset_rwmutex_rlock lock(olistMutex); uniset_rwmutex_rlock lock(olistMutex);
for( auto && o : olist ) for( auto&& o : olist )
{ {
if( o->getName() == name ) if( o->getName() == name )
return o; return o;
...@@ -477,7 +477,7 @@ const std::shared_ptr<UniSetManager> UniSetManager::findManager( const string& n ...@@ -477,7 +477,7 @@ const std::shared_ptr<UniSetManager> UniSetManager::findManager( const string& n
{ {
uniset_rwmutex_rlock lock(mlistMutex); uniset_rwmutex_rlock lock(mlistMutex);
for( auto && m : mlist ) for( auto&& m : mlist )
{ {
if( m->getName() == name ) if( m->getName() == name )
return m; return m;
......
...@@ -97,6 +97,7 @@ TEST_CASE("UniXML::iterator", "[unixml][iterator][basic]" ) ...@@ -97,6 +97,7 @@ TEST_CASE("UniXML::iterator", "[unixml][iterator][basic]" )
--it; --it;
CHECK( it.getName() == "UserData" ); CHECK( it.getName() == "UserData" );
UniXML::iterator it_bad = uxml.begin(); UniXML::iterator it_bad = uxml.begin();
REQUIRE_FALSE( it_bad.findName("UnknownNode", "NOTFOUND") ); REQUIRE_FALSE( it_bad.findName("UnknownNode", "NOTFOUND") );
REQUIRE_FALSE( !it_bad ); 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