diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-26 14:09:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-27 14:42:02 +0100 |
commit | dac1ff8b233d319e660670e0eb091ce2e1cf1c0d (patch) | |
tree | ce44fa0d00aeda3a5866382aac62c5e51a8bed3b /xmlhelp | |
parent | b6449c65daa2854b8241e14c0966721412f16515 (diff) |
convert treeview::TVDom::Kind to scoped enum
Change-Id: Ia505df60f5758d40dd55bc5b24886fd8aec327ce
Reviewed-on: https://gerrit.libreoffice.org/64092
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 0667b3fdfd55..c6fe6d0c74ab 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -50,7 +50,7 @@ namespace treeview { public: explicit TVDom( TVDom* arent = nullptr ) - : kind( other ), + : kind( Kind::other ), parent( arent ), children( 0 ) { @@ -76,13 +76,13 @@ namespace treeview { return const_cast<TVDom*>(this); // I am my own parent, if I am the root } - enum Kind { + enum class Kind { tree_node, tree_leaf, other }; - bool isLeaf() const { return kind == TVDom::tree_leaf; } + bool isLeaf() const { return kind == TVDom::Kind::tree_leaf; } void setKind( Kind ind ) { kind = ind; } void setApplication( const char* appl ) @@ -330,9 +330,9 @@ static void start_handler(void *userData, if( strcmp( name,"help_section" ) == 0 || strcmp( name,"node" ) == 0 ) - kind = TVDom::tree_node; + kind = TVDom::Kind::tree_node; else if( strcmp( name,"topic" ) == 0 ) - kind = TVDom::tree_leaf; + kind = TVDom::Kind::tree_leaf; else return; |