summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-02 11:00:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-02 12:19:01 +0100
commit884cbe174ee5e343e9ed56093421aad3e467bf57 (patch)
treebb62e25fe5d1768cc1f493634573eb22473d2944 /basic
parent11cc1afb2fd46c3dfdd519ad51c5fb2e7e3b7837 (diff)
RID_* can be extern global variables
no need to access them via methods Change-Id: If0d1a65d6f56ce2fc585749d974ba13c9f2749b2 Reviewed-on: https://gerrit.libreoffice.org/47245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/inc/basic.hrc2
-rw-r--r--basic/source/classes/sb.cxx7
2 files changed, 2 insertions, 7 deletions
diff --git a/basic/inc/basic.hrc b/basic/inc/basic.hrc
index 49eb93cd102d..36fe29f11ef3 100644
--- a/basic/inc/basic.hrc
+++ b/basic/inc/basic.hrc
@@ -22,7 +22,7 @@
#define NC_(Context, String) (Context "\004" u8##String)
-std::pair<const char*, ErrCode> RID_BASIC_START[] =
+std::pair<const char*, ErrCode> const RID_BASIC_START[] =
{
{ NC_("RID_BASIC_START", "Syntax error."), ERRCODE_BASIC_SYNTAX },
{ NC_("RID_BASIC_START", "Return without Gosub."), ERRCODE_BASIC_NO_GOSUB },
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 1be75c333424..1dcd71704399 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1560,18 +1560,13 @@ void StarBASIC::SetErrorData( ErrCode nCode, sal_uInt16 nLine,
aGlobals.nCol2 = nCol2;
}
-const ErrMsgCode* getRID_BASIC_START()
-{
- return RID_BASIC_START;
-}
-
void StarBASIC::MakeErrorText( ErrCode nId, const OUString& aMsg )
{
SolarMutexGuard aSolarGuard;
sal_uInt16 nOldID = GetVBErrorCode( nId );
const char* pErrorMsg = nullptr;
- for (ErrMsgCode* pItem = RID_BASIC_START; pItem->second; ++pItem)
+ for (std::pair<const char *, ErrCode> const *pItem = RID_BASIC_START; pItem->second; ++pItem)
{
if (nId == pItem->second)
{