@@ -346,7 +346,7 @@ void Countly::_changeDeviceIdWithoutMerge(const std::string &value) {
346346
347347 // send all event to server and end current session of old user
348348 flushEvents ();
349- if (! configuration->manualSessionControl ){
349+ if (configuration->manualSessionControl == false ){
350350 endSession ();
351351 }
352352
@@ -355,7 +355,7 @@ void Countly::_changeDeviceIdWithoutMerge(const std::string &value) {
355355 mutex->unlock ();
356356
357357 // start a new session for new user
358- if (! configuration->manualSessionControl ){
358+ if (configuration->manualSessionControl == false ){
359359 beginSession ();
360360 }
361361
@@ -438,7 +438,7 @@ void Countly::start(const std::string &app_key, const std::string &host, int por
438438
439439 if (!running) {
440440
441- if (! configuration->manualSessionControl ){
441+ if (configuration->manualSessionControl == false ){
442442 mutex->unlock ();
443443 beginSession ();
444444 mutex->lock ();
@@ -469,7 +469,7 @@ void Countly::startOnCloud(const std::string &app_key) {
469469
470470void Countly::stop () {
471471 _deleteThread ();
472- if (! configuration->manualSessionControl ) {
472+ if (configuration->manualSessionControl == false ) {
473473 endSession ();
474474 }
475475}
@@ -611,7 +611,7 @@ bool Countly::attemptSessionUpdateEQ() {
611611 return false ;
612612 }
613613#endif
614- if (! configuration->manualSessionControl ){
614+ if (configuration->manualSessionControl == false ){
615615 return !updateSession ();
616616 } else {
617617 packEvents ();
@@ -676,7 +676,7 @@ std::vector<std::string> Countly::debugReturnStateOfEQ() {
676676bool Countly::beginSession () {
677677 mutex->lock ();
678678 log (LogLevel::INFO, " [Countly][beginSession]" );
679- if (began_session) {
679+ if (began_session == true ) {
680680 mutex->unlock ();
681681 log (LogLevel::DEBUG, " [Countly][beginSession] Session is already active." );
682682 return true ;
@@ -732,9 +732,9 @@ bool Countly::updateSession() {
732732 try {
733733 // Check if there was a session, if not try to start one
734734 mutex->lock ();
735- if (! began_session) {
735+ if (began_session == false ) {
736736 mutex->unlock ();
737- if (configuration->manualSessionControl ){
737+ if (configuration->manualSessionControl == true ){
738738 log (LogLevel::WARNING, " [Countly][updateSession] SDK is in manual session control mode and there is no active session. Please start a session first." );
739739 return false ;
740740 }
@@ -859,7 +859,7 @@ void Countly::sendEventsToRQ(const nlohmann::json &events) {
859859
860860bool Countly::endSession () {
861861 log (LogLevel::INFO, " [Countly][endSession]" );
862- if (! began_session) {
862+ if (began_session == false ) {
863863 log (LogLevel::DEBUG, " [Countly][endSession] There is no active session to end." );
864864 return true ;
865865 }
@@ -1200,9 +1200,9 @@ void Countly::updateLoop() {
12001200 size_t last_wait_milliseconds = wait_milliseconds;
12011201 mutex->unlock ();
12021202 std::this_thread::sleep_for (std::chrono::milliseconds (last_wait_milliseconds));
1203- if (enable_automatic_session && ! configuration->manualSessionControl ) {
1203+ if (enable_automatic_session == true && configuration->manualSessionControl == false ) {
12041204 updateSession ();
1205- } else {
1205+ } else if (configuration-> manualSessionControl == true ) {
12061206 packEvents ();
12071207 }
12081208 requestModule->processQueue (mutex);
0 commit comments