diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-24 09:29:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-24 11:48:39 +0200 |
commit | 2f9d53df89614955215a630beb0966f0c4a663c2 (patch) | |
tree | 31600e6d12542e4c04b2e12e16f5c54c708d7d0f /include | |
parent | cdf176c9749ed1a0c2faceeae0c73bf735c5b00b (diff) |
remove unused exc_handling enum
Change-Id: I5e2e084114c8b0eedd0f2cd8327d6c6d68742462
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/flagguard.hxx | 8 | ||||
-rw-r--r-- | include/comphelper/scopeguard.hxx | 7 |
2 files changed, 5 insertions, 10 deletions
diff --git a/include/comphelper/flagguard.hxx b/include/comphelper/flagguard.hxx index 7ab88e4d98a1..96e721e7aa79 100644 --- a/include/comphelper/flagguard.hxx +++ b/include/comphelper/flagguard.hxx @@ -31,8 +31,8 @@ namespace comphelper class COMPHELPER_DLLPUBLIC FlagRestorationGuard : public ScopeGuard { public: - FlagRestorationGuard( bool& i_flagRef, bool i_temporaryValue, exc_handling i_excHandling = IGNORE_EXCEPTIONS ) - : ScopeGuard(RestoreFlag(i_flagRef), i_excHandling) + FlagRestorationGuard( bool& i_flagRef, bool i_temporaryValue ) + : ScopeGuard(RestoreFlag(i_flagRef)) { i_flagRef = i_temporaryValue; } @@ -61,8 +61,8 @@ namespace comphelper class COMPHELPER_DLLPUBLIC FlagGuard : public ScopeGuard { public: - explicit FlagGuard( bool& i_flagRef, exc_handling i_excHandling = IGNORE_EXCEPTIONS ) - : ScopeGuard( [&i_flagRef] () { i_flagRef = false; }, i_excHandling) + explicit FlagGuard( bool& i_flagRef ) + : ScopeGuard( [&i_flagRef] () { i_flagRef = false; } ) { i_flagRef = true; } diff --git a/include/comphelper/scopeguard.hxx b/include/comphelper/scopeguard.hxx index 629950ccc151..47b62b5f234e 100644 --- a/include/comphelper/scopeguard.hxx +++ b/include/comphelper/scopeguard.hxx @@ -31,16 +31,12 @@ namespace comphelper { class COMPHELPER_DLLPUBLIC ScopeGuard { public: - enum exc_handling { IGNORE_EXCEPTIONS, ALLOW_EXCEPTIONS }; - /** @param func function object to be executed in dtor @param excHandling switches whether thrown exceptions in dtor will be silently ignored (but OSL_ asserted) */ template <typename func_type> - explicit ScopeGuard( func_type const & func, - exc_handling excHandling = IGNORE_EXCEPTIONS ) - : m_func( func ), m_excHandling( excHandling ) {} + explicit ScopeGuard( func_type const & func ) : m_func( func ) {} ~ScopeGuard(); @@ -55,7 +51,6 @@ private: ScopeGuard& operator=(const ScopeGuard&) = delete; ::std::function<void ()> m_func; - exc_handling const m_excHandling; }; } // namespace comphelper |