summaryrefslogtreecommitdiffstats
path: root/include/dbaccess
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-09 15:52:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-10 09:16:53 +0100
commite3560f4770487c8d38463fb4a9a63325abc385f9 (patch)
treecc2ea6d5d18de966e4677ebfd846c1bf5ec5c216 /include/dbaccess
parentTabbed NB: sync home/text tab (diff)
downloadcore-e3560f4770487c8d38463fb4a9a63325abc385f9.tar.gz
core-e3560f4770487c8d38463fb4a9a63325abc385f9.zip
Replace deprecated boost::optional::reset(val) with operator =
Change-Id: I7340a561e0df0c781fd834388deb4b9f83800f9b Reviewed-on: https://gerrit.libreoffice.org/63221 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/dbaccess')
-rw-r--r--include/dbaccess/genericcontroller.hxx41
1 files changed, 5 insertions, 36 deletions
diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx
index 4f97727acc9b..139d6fdd6838 100644
--- a/include/dbaccess/genericcontroller.hxx
+++ b/include/dbaccess/genericcontroller.hxx
@@ -97,45 +97,14 @@ namespace dbaui
{
class ODataView;
-
- // = optional
-
- /** convenience wrapper around boost::optional, allowing typed assignments
- */
- template < typename T >
- class optional : public ::boost::optional< T >
- {
- typedef ::boost::optional< T > base_type;
-
- public:
- optional ( ) : base_type( ) { }
- explicit optional ( T const& val ) : base_type( val ) { }
- optional ( optional const& rhs ) : base_type( static_cast<base_type const&>(rhs) ) { }
-
- public:
- optional& operator= ( T const& rhs )
- {
- base_type::reset( rhs );
- return *this;
- }
- optional& operator= ( optional< T > const& rhs )
- {
- if ( rhs.is_initialized() )
- base_type::reset( rhs.get() );
- else
- base_type::reset();
- return *this;
- }
- };
-
template< typename T >
- inline bool SAL_CALL operator >>= ( const css::uno::Any & _any, optional< T >& _value )
+ inline bool SAL_CALL operator >>= (const css::uno::Any& _any, boost::optional< T >& _value)
{
_value.reset(); // de-init the optional value
T directValue = T();
if ( _any >>= directValue )
- _value.reset( directValue );
+ _value = directValue;
return !!_value;
}
@@ -153,10 +122,10 @@ namespace dbaui
{
bool bEnabled;
- optional< bool > bChecked;
- optional< bool > bInvisible;
+ boost::optional<bool> bChecked;
+ boost::optional<bool> bInvisible;
css::uno::Any aValue;
- optional< OUString > sTitle;
+ boost::optional<OUString> sTitle;
FeatureState() : bEnabled(false) { }
};