diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 09:55:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 12:42:04 +0200 |
commit | 9651424f73a45679fcd1f6cc596e56c7432640d9 (patch) | |
tree | e14aa40091704aeef66f98079edb9e5a0be0381f /idlc | |
parent | 63e0ffab01317210424023d70b49014e1ebe6e29 (diff) |
convert WarningCode to scoped enum
and drop unused enumerators
Change-Id: I212cf132c2406e85b44b1af552b0989cecbec162
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/inc/errorhandler.hxx | 8 | ||||
-rw-r--r-- | idlc/source/errorhandler.cxx | 10 | ||||
-rw-r--r-- | idlc/source/parser.y | 2 |
3 files changed, 4 insertions, 16 deletions
diff --git a/idlc/inc/errorhandler.hxx b/idlc/inc/errorhandler.hxx index 8770cc93ac61..2e953617b78b 100644 --- a/idlc/inc/errorhandler.hxx +++ b/idlc/inc/errorhandler.hxx @@ -77,13 +77,9 @@ enum ErrorCode EIDL_SIMILAR_CONSTRUCTORS }; -enum WarningCode +enum class WarningCode { - WIDL_EXPID_CONFLICT, // exception id conflict - WIDL_REQID_CONFLICT, // request id conflict - WIDL_INHERIT_IDCONFLICT, // request id conflict inheritance tree - WIDL_TYPE_IDENT_CONFLICT, // type and identifier has equal names - WIDL_WRONG_NAMING_CONV // type or identifier doesn't fulfill the UNO naming convention + WrongNamingConvention // type or identifier doesn't fulfill the UNO naming convention }; class ErrorHandler diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx index 3b4dfbaf864a..4fd23868bad0 100644 --- a/idlc/source/errorhandler.cxx +++ b/idlc/source/errorhandler.cxx @@ -145,15 +145,7 @@ static const sal_Char* warningCodeToMessage(WarningCode wCode) { switch (wCode) { - case WIDL_EXPID_CONFLICT: - return "exception id conflict: "; - case WIDL_REQID_CONFLICT: - return "request id conflict: "; - case WIDL_INHERIT_IDCONFLICT: - return "request id conflict in inheritance tree: "; - case WIDL_TYPE_IDENT_CONFLICT: - return "type and parameter|member name are equal: "; - case WIDL_WRONG_NAMING_CONV: + case WarningCode::WrongNamingConvention: return "type or identifier doesn't fulfill the UNO naming convention: "; } return "unknown warning"; diff --git a/idlc/source/parser.y b/idlc/source/parser.y index 8fe0caf19d6d..f8b143be4434 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -89,7 +89,7 @@ void checkIdentifier(::rtl::OString* id) msg.getStr()); } else - ErrorHandler::warning0(WIDL_WRONG_NAMING_CONV, id->getStr()); + ErrorHandler::warning0(WarningCode::WrongNamingConvention, id->getStr()); } } |