From c9253818ec8252169c20450b41878be459568d95 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 30 Jul 2017 12:16:31 +0200 Subject: loplugin:oncevar extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basctl/source/basicide/doceventnotifier.cxx | 4 ++-- basctl/source/basicide/moduldl2.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx index 90e55e00ee18..66b44fcba789 100644 --- a/basctl/source/basicide/doceventnotifier.cxx +++ b/basctl/source/basicide/doceventnotifier.cxx @@ -133,7 +133,7 @@ namespace basctl const sal_Char* pEventName; void (DocumentEventListener::*listenerMethod)( const ScriptDocument& _rDocument ); }; - EventEntry aEvents[] = { + EventEntry const aEvents[] = { { "OnNew", &DocumentEventListener::onDocumentCreated }, { "OnLoad", &DocumentEventListener::onDocumentOpened }, { "OnSave", &DocumentEventListener::onDocumentSave }, @@ -145,7 +145,7 @@ namespace basctl { "OnModeChanged", &DocumentEventListener::onDocumentModeChanged } }; - for (EventEntry & aEvent : aEvents) + for (EventEntry const & aEvent : aEvents) { if ( !_rEvent.EventName.equalsAscii( aEvent.pEventName ) ) continue; diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 778c38e5e96c..fd78b185e7eb 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -149,8 +149,8 @@ CheckBox::CheckBox(vcl::Window* pParent, WinBits nStyle) , eMode(ObjectMode::Module) , m_aDocument(ScriptDocument::getApplicationScriptDocument()) { - long aTabs_[] = { 1, 12 }; // TabPos needs at least one... - // 12 because of the CheckBox + long const aTabs_[] = { 1, 12 }; // TabPos needs at least one... + // 12 because of the CheckBox SetTabs( aTabs_ ); Init(); } @@ -499,7 +499,7 @@ LibPage::LibPage(vcl::Window * pParent) m_pLibBox->EnableInplaceEditing(true); m_pLibBox->SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP ); - long aTabs[] = { 2, 30, 120 }; + long const aTabs[] = { 2, 30, 120 }; m_pLibBox->SetTabs( aTabs, MapUnit::MapPixel ); FillListBox(); -- cgit