message: Replacing void with template function
diff: @@ -4666,22 +4666,28 @@ void SystemTools::ClassInitialize()
  #endif
  }
  -void SystemTools::ClassFinalize()
  +namespace {
  +
  +template <class T>
  +void SafeDelete(T*& pointer)
  {
  - auto lf_Delete = [](void** pointer) {
  - if (*pointer != nullptr) {
  - delete *pointer;
  - *pointer = nullptr;
  + if (pointer != nullptr) {
  + delete pointer;
  + pointer = nullptr;
  + }
  }
  - };
  - lf_Delete(SystemTools::TranslationMap);
  +} // end empty namespace
  +
  +void SystemTools::ClassFinalize()
  +{
  + SafeDelete(SystemTools::TranslationMap);
  #ifdef _WIN32
  - lf_Delete(SystemTools::PathCaseMap);
  - lf_Delete(SystemTools::EnvMap);
  + SafeDelete(SystemTools::PathCaseMap);
  + SafeDelete(SystemTools::EnvMap);
  #endif
  #ifdef __CYGWIN__
  - lf_Delete(SystemTools::Cyg2Win32Map);
  + SafeDelete(SystemTools::Cyg2Win32Map);
  #endif
  }
  