[Libreoffice-commits] core.git: sal/osl
Caolán McNamara
caolanm at redhat.com
Mon Oct 5 09:13:20 PDT 2015
sal/osl/w32/profile.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit a335cac4f55b3bc2c9e92ba8a1028010ac92218c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 5 10:03:45 2015 +0100
use modern casts
Change-Id: If8f01fa8619097c8ea13f09302117308937e0340
Reviewed-on: https://gerrit.libreoffice.org/19150
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index b3ef175..ff7a025 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -1385,7 +1385,7 @@ static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line)
if (pProfile->m_Lines == NULL)
{
pProfile->m_MaxLines = LINES_INI;
- pProfile->m_Lines = (sal_Char **)calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
+ pProfile->m_Lines = static_cast<sal_Char **>(calloc(pProfile->m_MaxLines, sizeof(sal_Char *)));
}
else
{
@@ -1393,7 +1393,7 @@ static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line)
unsigned int oldmax=pProfile->m_MaxLines;
pProfile->m_MaxLines += LINES_ADD;
- pProfile->m_Lines = (sal_Char **)realloc(pProfile->m_Lines, pProfile->m_MaxLines * sizeof(sal_Char *));
+ pProfile->m_Lines = static_cast<sal_Char **>(realloc(pProfile->m_Lines, pProfile->m_MaxLines * sizeof(sal_Char *)));
for ( index = oldmax ; index < pProfile->m_MaxLines ; ++index )
{
@@ -1426,13 +1426,13 @@ static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Li
if (pProfile->m_Lines == NULL)
{
pProfile->m_MaxLines = LINES_INI;
- pProfile->m_Lines = (sal_Char **)calloc(pProfile->m_MaxLines, sizeof(sal_Char *));
+ pProfile->m_Lines = static_cast<sal_Char **>(calloc(pProfile->m_MaxLines, sizeof(sal_Char *)));
}
else
{
pProfile->m_MaxLines += LINES_ADD;
- pProfile->m_Lines = (sal_Char **)realloc(pProfile->m_Lines,
- pProfile->m_MaxLines * sizeof(sal_Char *));
+ pProfile->m_Lines = static_cast<sal_Char **>(realloc(pProfile->m_Lines,
+ pProfile->m_MaxLines * sizeof(sal_Char *)));
memset(&pProfile->m_Lines[pProfile->m_NoLines],
0,
@@ -1597,7 +1597,7 @@ static sal_Bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char*
if (pProfile->m_Sections == NULL)
{
pProfile->m_MaxSections = SECTIONS_INI;
- pProfile->m_Sections = (osl_TProfileSection *)calloc(pProfile->m_MaxSections, sizeof(osl_TProfileSection));
+ pProfile->m_Sections = static_cast<osl_TProfileSection*>(calloc(pProfile->m_MaxSections, sizeof(osl_TProfileSection)));
}
else
{
@@ -1605,8 +1605,8 @@ static sal_Bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char*
unsigned int oldmax=pProfile->m_MaxSections;
pProfile->m_MaxSections += SECTIONS_ADD;
- pProfile->m_Sections = (osl_TProfileSection *)realloc(pProfile->m_Sections,
- pProfile->m_MaxSections * sizeof(osl_TProfileSection));
+ pProfile->m_Sections = static_cast<osl_TProfileSection*>(realloc(pProfile->m_Sections,
+ pProfile->m_MaxSections * sizeof(osl_TProfileSection)));
for ( index = oldmax ; index < pProfile->m_MaxSections ; ++index )
{
pProfile->m_Sections[index].m_Entries=0;
More information about the Libreoffice-commits
mailing list