diff options
| author | Sébastien Gonzalve <oznog@users.noreply.github.com> | 2015-02-28 21:00:07 +0100 | 
|---|---|---|
| committer | Eric Laurent <elaurent@google.com> | 2015-04-24 13:39:13 -0700 | 
| commit | dea4e788adf3a2432ad2835cef0d235e9f93e260 (patch) | |
| tree | 3874c8e9b10e142bb4480c95161e96dac8681818 | |
| parent | e388d91e3797dc0adef0022eab503b5bc6f2e5ca (diff) | |
| download | external_parameter-framework-dea4e788adf3a2432ad2835cef0d235e9f93e260.zip external_parameter-framework-dea4e788adf3a2432ad2835cef0d235e9f93e260.tar.gz external_parameter-framework-dea4e788adf3a2432ad2835cef0d235e9f93e260.tar.bz2  | |
stop messing around with useless pointer
Backsynchronizer is dynamically allocated for simulation purpose.
Nevertheless, this is useless as this can be easily achieved thanks to a
typedef.
This patch simplify the backsynchronization use.
Signed-off-by: Sébastien Gonzalve <oznog@users.noreply.github.com>
| -rw-r--r-- | parameter/ParameterMgr.cpp | 31 | ||||
| -rw-r--r-- | parameter/ParameterMgr.h | 4 | 
2 files changed, 11 insertions, 24 deletions
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp index 2e66c02..45f1ac2 100644 --- a/parameter/ParameterMgr.cpp +++ b/parameter/ParameterMgr.cpp @@ -97,6 +97,15 @@  #define base CElement +#ifdef SIMULATION +    // In simulation, back synchronization of the blackboard won't probably work +    // We need to ensure though the blackboard is initialized with valid data +    typedef CSimulatedBackSynchronizer BackSynchronizer; +#else +    // Real back synchronizer from subsystems +    typedef CHardwareBackSynchronizer BackSynchronizer; +#endif +  using std::string;  using std::list;  using std::vector; @@ -467,17 +476,12 @@ bool CParameterMgr::load(string& strError)          return false;      } -    // Back synchronization for areas in parameter blackboard not covered by any domain -    CBackSynchronizer* pBackSynchronizer = createBackSynchronizer(); -    // Back-synchronize      {          CAutoLog autoLog(this, "Main blackboard back synchronization"); -        pBackSynchronizer->sync(); - -        // Get rid of back synchronizer -        delete pBackSynchronizer; +	// Back synchronization for areas in parameter blackboard not covered by any domain +	BackSynchronizer(getConstSystemClass(), _pMainParameterBlackboard).sync();      }      // We're done loading the settings and back synchronizing @@ -2541,19 +2545,6 @@ bool CParameterMgr::handleRemoteProcessingInterface(string& strError)      return true;  } -// Back synchronization -CBackSynchronizer* CParameterMgr::createBackSynchronizer() const -{ -#ifdef SIMULATION -    // In simulation, back synchronization of the blackboard won't probably work -    // We need to ensure though the blackboard is initialized with valid data -    return new CSimulatedBackSynchronizer(getConstSystemClass(), _pMainParameterBlackboard); -#else -    // Real back synchronizer from subsystems -    return new CHardwareBackSynchronizer(getConstSystemClass(), _pMainParameterBlackboard); -#endif -} -  // Children typwise access  CParameterFrameworkConfiguration* CParameterMgr::getFrameworkConfiguration()  { diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h index 9c6d6fd..d0b71bd 100644 --- a/parameter/ParameterMgr.h +++ b/parameter/ParameterMgr.h @@ -52,7 +52,6 @@ class CSystemClassConfiguration;  class CParameterBlackboard;  class CConfigurableDomains;  class IRemoteProcessorServerInterface; -class CBackSynchronizer;  class CParameterHandle;  class CSubsystemPlugins;  class CParameterAccessContext; @@ -573,9 +572,6 @@ private:      // Remote Processor Server connection handling      bool handleRemoteProcessingInterface(std::string& strError); -    // Back synchronization -    CBackSynchronizer* createBackSynchronizer() const; -      // Tuning      bool _bTuningModeIsOn;  | 
