Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jun 30, 2019
1 parent 0ee58a2 commit bc996fe
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
10 changes: 5 additions & 5 deletions Engine/AppManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ AppManager::loadInternalAfterInitGui(const CLArgs& cl)
_imp->_diskCache = boost::make_shared<Cache<Image> >("DiskCache", NATRON_CACHE_VERSION, maxDiskCacheNode, 0.);
_imp->_viewerCache = boost::make_shared<Cache<FrameEntry> >("ViewerCache", NATRON_CACHE_VERSION, viewerCacheSize, 0.);
_imp->setViewerCacheTileSize();
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}

Expand Down Expand Up @@ -1100,15 +1100,15 @@ AppManager::loadInternalAfterInitGui(const CLArgs& cl)
///Set host properties after restoring settings since it depends on the host name.
try {
_imp->ofxHost->setProperties();
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}

/*loading all plugins*/
try {
loadAllPlugins();
_imp->loadBuiltinFormats();
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}

Expand Down Expand Up @@ -1167,13 +1167,13 @@ AppManager::loadInternalAfterInitGui(const CLArgs& cl)
if (!wasKilled) {
try {
mainInstance->getProject()->reset(true/*aboutToQuit*/, true /*blocking*/);
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}

try {
mainInstance->quitNow();
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}
}
Expand Down
12 changes: 6 additions & 6 deletions Engine/OfxHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ OfxHost::loadOFXPlugins(IOPluginsMap* readersMap,
pluginCache->addFileToPath(natronBundledPluginsPath);
}
}
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}

Expand Down Expand Up @@ -1539,7 +1539,7 @@ OfxHost::mutexCreate(OfxMutexHandle *mutex,
#endif

return kOfxStatOK;
} catch (std::bad_alloc) {
} catch (std::bad_alloc&) {
qDebug() << "mutexCreate(): memory error.";

return kOfxStatErrMemory;
Expand Down Expand Up @@ -1580,7 +1580,7 @@ OfxHost::mutexDestroy(const OfxMutexHandle mutex)
#endif

return kOfxStatOK;
} catch (std::bad_alloc) {
} catch (std::bad_alloc&) {
qDebug() << "mutexDestroy(): memory error.";

return kOfxStatErrMemory;
Expand Down Expand Up @@ -1610,7 +1610,7 @@ OfxHost::mutexLock(const OfxMutexHandle mutex)
reinterpret_cast<QMutex*>(mutex)->lock();

return kOfxStatOK;
} catch (std::bad_alloc) {
} catch (std::bad_alloc&) {
qDebug() << "mutexLock(): memory error.";

return kOfxStatErrMemory;
Expand Down Expand Up @@ -1639,7 +1639,7 @@ OfxHost::mutexUnLock(const OfxMutexHandle mutex)
reinterpret_cast<QMutex*>(mutex)->unlock();

return kOfxStatOK;
} catch (std::bad_alloc) {
} catch (std::bad_alloc&) {
qDebug() << "mutexUnLock(): memory error.";

return kOfxStatErrMemory;
Expand Down Expand Up @@ -1671,7 +1671,7 @@ OfxHost::mutexTryLock(const OfxMutexHandle mutex)
} else {
return kOfxStatFailed;
}
} catch (std::bad_alloc) {
} catch (std::bad_alloc&) {
qDebug() << "mutexTryLock(): memory error.";

return kOfxStatErrMemory;
Expand Down
2 changes: 1 addition & 1 deletion Engine/Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ Project::onOCIOConfigPathChanged(const std::string& path,
_imp->envVars->setValue(newEnv);
}
endChanges(block);
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}
}
Expand Down
6 changes: 3 additions & 3 deletions Engine/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ Settings::saveSettings(const std::vector<KnobI*>& knobs,
} else {
assert(false);
}
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}
} // for (int j = 0; j < knobs[i]->getDimension(); ++j) {
Expand Down Expand Up @@ -2121,7 +2121,7 @@ Settings::restoreSettings(bool useDefault)
appPTR->setNThreadsToRender( getNumberOfThreads() );
appPTR->setUseThreadPool( _useThreadPool->getValue() );
appPTR->setPluginsUseInputImageCopyToRender( _pluginUseImageCopyForSource->getValue() );
} catch (std::logic_error) {
} catch (std::logic_error&) {
// ignore
}

Expand Down Expand Up @@ -2706,7 +2706,7 @@ Settings::getOpenFXPluginsSearchPaths(std::list<std::string>* paths) const
assert(paths);
try {
_extraPluginPaths->getPaths(paths);
} catch (std::logic_error) {
} catch (std::logic_error&) {
paths->clear();
}
}
Expand Down
3 changes: 3 additions & 0 deletions Engine/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON
#include "Global/Macros.h"

GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF
GCC_ONLY_DIAG_OFF(class-memaccess)
#include <QtCore/QVector>
GCC_ONLY_DIAG_ON(class-memaccess)
#include <QtCore>
GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_ON

Expand Down

0 comments on commit bc996fe

Please sign in to comment.