summaryrefslogtreecommitdiff
path: root/dbaccess/source/ext/macromigration/migrationengine.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-03-28 17:12:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-31 08:00:13 +0000
commit1aa4df615fa5599d05e9dd5e925b5852676185fa (patch)
tree1f637fa13140941a5775c91f058d0742f911693f /dbaccess/source/ext/macromigration/migrationengine.cxx
parent2bd1e7aafeebdfe0e1656ed1ff01762039be5af1 (diff)
use SAL_N_ELEMENTS in for loops
for with git grep -n 'for.*sizeof' Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f Reviewed-on: https://gerrit.libreoffice.org/23569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess/source/ext/macromigration/migrationengine.cxx')
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 94dd12c650a1..c4f02cde15ac 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -190,16 +190,16 @@ namespace dbmm
{
struct LanguageMapping
{
- const sal_Char* pAsciiLanguage;
+ const char* pAsciiLanguage;
const ScriptType eScriptType;
- LanguageMapping( const sal_Char* _pAsciiLanguage, const ScriptType _eScriptType )
+ LanguageMapping( const char* _pAsciiLanguage, const ScriptType _eScriptType )
:pAsciiLanguage( _pAsciiLanguage )
,eScriptType( _eScriptType )
{
}
- }
- aLanguageMapping[] =
+ };
+ const LanguageMapping aLanguageMapping[] =
{
LanguageMapping( "JavaScript", eJavaScript ),
LanguageMapping( "BeanShell", eBeanShell ),
@@ -207,7 +207,7 @@ namespace dbmm
LanguageMapping( "Python", ePython ), // TODO: is this correct?
LanguageMapping( "Basic", eBasic )
};
- for ( size_t i=0; i < sizeof( aLanguageMapping ) / sizeof( aLanguageMapping[0] ); ++i )
+ for ( size_t i=0; i < SAL_N_ELEMENTS( aLanguageMapping ); ++i )
{
if ( _rLanguage.equalsAscii( aLanguageMapping[i].pAsciiLanguage ) )
{
@@ -1205,10 +1205,10 @@ namespace dbmm
}
::std::set< OUString > aElementNames( aDocStorage.getElementNames() );
- ScriptType aKnownStorageBasedTypes[] = {
+ const ScriptType aKnownStorageBasedTypes[] = {
eBeanShell, eJavaScript, ePython, eJava
};
- for ( size_t i=0; i<sizeof( aKnownStorageBasedTypes ) / sizeof( aKnownStorageBasedTypes[0] ); ++i )
+ for ( size_t i=0; i<SAL_N_ELEMENTS( aKnownStorageBasedTypes ); ++i )
aElementNames.erase( lcl_getScriptsSubStorageName( aKnownStorageBasedTypes[i] ) );
if ( !aElementNames.empty() )