Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a96b564a
Kaydet (Commit)
a96b564a
authored
Kas 10, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:nullptr (automatic rewrite)
Change-Id: Ic42387288c96436915956ede2eb510b9c3fbc49b
üst
85552d86
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
151 additions
and
151 deletions
+151
-151
astattribute.hxx
idlc/inc/idlc/astattribute.hxx
+4
-4
astinterface.hxx
idlc/inc/idlc/astinterface.hxx
+1
-1
astoperation.hxx
idlc/inc/idlc/astoperation.hxx
+1
-1
astsequence.hxx
idlc/inc/idlc/astsequence.hxx
+2
-2
asttypedef.hxx
idlc/inc/idlc/asttypedef.hxx
+1
-1
astdeclaration.cxx
idlc/source/astdeclaration.cxx
+1
-1
astdump.cxx
idlc/source/astdump.cxx
+2
-2
astenum.cxx
idlc/source/astenum.cxx
+1
-1
astexpression.cxx
idlc/source/astexpression.cxx
+67
-67
astinterface.cxx
idlc/source/astinterface.cxx
+4
-4
astoperation.cxx
idlc/source/astoperation.cxx
+2
-2
astscope.cxx
idlc/source/astscope.cxx
+18
-18
aststack.cxx
idlc/source/aststack.cxx
+4
-4
aststruct.cxx
idlc/source/aststruct.cxx
+5
-5
aststructinstance.cxx
idlc/source/aststructinstance.cxx
+2
-2
fehelper.cxx
idlc/source/fehelper.cxx
+7
-7
idlc.cxx
idlc/source/idlc.cxx
+12
-12
idlccompile.cxx
idlc/source/idlccompile.cxx
+10
-10
idlcmain.cxx
idlc/source/idlcmain.cxx
+3
-3
idlcproduce.cxx
idlc/source/idlcproduce.cxx
+1
-1
options.cxx
idlc/source/options.cxx
+3
-3
No files found.
idlc/inc/idlc/astattribute.hxx
Dosyayı görüntüle @
a96b564a
...
@@ -47,16 +47,16 @@ public:
...
@@ -47,16 +47,16 @@ public:
OUString
const
*
getDoc
,
DeclList
const
*
getExc
,
OUString
const
*
getDoc
,
DeclList
const
*
getExc
,
OUString
const
*
setDoc
,
DeclList
const
*
setExc
)
OUString
const
*
setDoc
,
DeclList
const
*
setExc
)
{
{
if
(
getDoc
!=
0
)
{
if
(
getDoc
!=
nullptr
)
{
m_getDocumentation
=
*
getDoc
;
m_getDocumentation
=
*
getDoc
;
}
}
if
(
getExc
!=
0
)
{
if
(
getExc
!=
nullptr
)
{
m_getExceptions
=
*
getExc
;
m_getExceptions
=
*
getExc
;
}
}
if
(
setDoc
!=
0
)
{
if
(
setDoc
!=
nullptr
)
{
m_setDocumentation
=
*
setDoc
;
m_setDocumentation
=
*
setDoc
;
}
}
if
(
setExc
!=
0
)
{
if
(
setExc
!=
nullptr
)
{
m_setExceptions
=
*
setExc
;
m_setExceptions
=
*
setExc
;
}
}
}
}
...
...
idlc/inc/idlc/astinterface.hxx
Dosyayı görüntüle @
a96b564a
...
@@ -85,7 +85,7 @@ private:
...
@@ -85,7 +85,7 @@ private:
INTERFACE_INDIRECT_MANDATORY
,
INTERFACE_DIRECT_MANDATORY
};
INTERFACE_INDIRECT_MANDATORY
,
INTERFACE_DIRECT_MANDATORY
};
struct
VisibleMember
{
struct
VisibleMember
{
explicit
VisibleMember
(
AstDeclaration
const
*
theMandatory
=
0
)
:
explicit
VisibleMember
(
AstDeclaration
const
*
theMandatory
=
nullptr
)
:
mandatory
(
theMandatory
)
{}
mandatory
(
theMandatory
)
{}
typedef
std
::
map
<
OString
,
AstDeclaration
const
*
>
Optionals
;
typedef
std
::
map
<
OString
,
AstDeclaration
const
*
>
Optionals
;
...
...
idlc/inc/idlc/astoperation.hxx
Dosyayı görüntüle @
a96b564a
...
@@ -39,7 +39,7 @@ public:
...
@@ -39,7 +39,7 @@ public:
bool
isVariadic
()
const
;
bool
isVariadic
()
const
;
bool
isConstructor
()
const
{
return
m_pReturnType
==
0
;
}
bool
isConstructor
()
const
{
return
m_pReturnType
==
nullptr
;
}
void
setExceptions
(
DeclList
const
*
pExceptions
);
void
setExceptions
(
DeclList
const
*
pExceptions
);
sal_uInt16
nExceptions
()
sal_uInt16
nExceptions
()
...
...
idlc/inc/idlc/astsequence.hxx
Dosyayı görüntüle @
a96b564a
...
@@ -27,7 +27,7 @@ public:
...
@@ -27,7 +27,7 @@ public:
AstSequence
(
AstType
const
*
pMemberType
,
AstScope
*
pScope
)
AstSequence
(
AstType
const
*
pMemberType
,
AstScope
*
pScope
)
:
AstType
(
NT_sequence
,
OString
(
"[]"
)
+
pMemberType
->
getScopedName
(),
pScope
)
:
AstType
(
NT_sequence
,
OString
(
"[]"
)
+
pMemberType
->
getScopedName
(),
pScope
)
,
m_pMemberType
(
pMemberType
)
,
m_pMemberType
(
pMemberType
)
,
m_pRelativName
(
NULL
)
,
m_pRelativName
(
nullptr
)
{}
{}
virtual
~
AstSequence
()
virtual
~
AstSequence
()
{
{
...
@@ -39,7 +39,7 @@ public:
...
@@ -39,7 +39,7 @@ public:
{
return
m_pMemberType
;
}
{
return
m_pMemberType
;
}
virtual
bool
isUnsigned
()
const
override
virtual
bool
isUnsigned
()
const
override
{
return
m_pMemberType
!=
0
&&
m_pMemberType
->
isUnsigned
();
}
{
return
m_pMemberType
!=
nullptr
&&
m_pMemberType
->
isUnsigned
();
}
virtual
const
sal_Char
*
getRelativName
()
const
override
;
virtual
const
sal_Char
*
getRelativName
()
const
override
;
private
:
private
:
...
...
idlc/inc/idlc/asttypedef.hxx
Dosyayı görüntüle @
a96b564a
...
@@ -34,7 +34,7 @@ public:
...
@@ -34,7 +34,7 @@ public:
{
return
m_pBaseType
;
}
{
return
m_pBaseType
;
}
virtual
bool
isUnsigned
()
const
override
virtual
bool
isUnsigned
()
const
override
{
return
m_pBaseType
!=
0
&&
m_pBaseType
->
isUnsigned
();
}
{
return
m_pBaseType
!=
nullptr
&&
m_pBaseType
->
isUnsigned
();
}
virtual
bool
dump
(
RegistryKey
&
rKey
)
override
;
virtual
bool
dump
(
RegistryKey
&
rKey
)
override
;
private
:
private
:
...
...
idlc/source/astdeclaration.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -132,7 +132,7 @@ bool AstDeclaration::dump(RegistryKey& rKey)
...
@@ -132,7 +132,7 @@ bool AstDeclaration::dump(RegistryKey& rKey)
{
{
DeclList
::
const_iterator
iter
=
pScope
->
getIteratorBegin
();
DeclList
::
const_iterator
iter
=
pScope
->
getIteratorBegin
();
DeclList
::
const_iterator
end
=
pScope
->
getIteratorEnd
();
DeclList
::
const_iterator
end
=
pScope
->
getIteratorEnd
();
AstDeclaration
*
pDecl
=
NULL
;
AstDeclaration
*
pDecl
=
nullptr
;
while
(
iter
!=
end
&&
bRet
)
while
(
iter
!=
end
&&
bRet
)
{
{
pDecl
=
*
iter
;
pDecl
=
*
iter
;
...
...
idlc/source/astdump.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -250,7 +250,7 @@ bool AstService::dump(RegistryKey& rKey)
...
@@ -250,7 +250,7 @@ bool AstService::dump(RegistryKey& rKey)
break
;
break
;
case
NT_property
:
case
NT_property
:
static_cast
<
AstAttribute
*>
(
*
i
)
->
dumpBlob
(
writer
,
propertyIndex
++
,
0
);
static_cast
<
AstAttribute
*>
(
*
i
)
->
dumpBlob
(
writer
,
propertyIndex
++
,
nullptr
);
break
;
break
;
case
NT_interface_member
:
case
NT_interface_member
:
...
@@ -388,7 +388,7 @@ void AstAttribute::dumpExceptions(
...
@@ -388,7 +388,7 @@ void AstAttribute::dumpExceptions(
DeclList
const
&
exceptions
,
RTMethodMode
flags
,
sal_uInt16
*
methodIndex
)
DeclList
const
&
exceptions
,
RTMethodMode
flags
,
sal_uInt16
*
methodIndex
)
{
{
if
(
!
exceptions
.
empty
())
{
if
(
!
exceptions
.
empty
())
{
OSL_ASSERT
(
methodIndex
!=
0
);
OSL_ASSERT
(
methodIndex
!=
nullptr
);
sal_uInt16
idx
=
(
*
methodIndex
)
++
;
sal_uInt16
idx
=
(
*
methodIndex
)
++
;
// exceptions.size() <= SAL_MAX_UINT16 already checked in
// exceptions.size() <= SAL_MAX_UINT16 already checked in
// AstInterface::dump:
// AstInterface::dump:
...
...
idlc/source/astenum.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -52,7 +52,7 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr)
...
@@ -52,7 +52,7 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr)
if
(
pExpr
->
getExprValue
()
->
u
.
lval
>
m_enumValueCount
)
if
(
pExpr
->
getExprValue
()
->
u
.
lval
>
m_enumValueCount
)
m_enumValueCount
=
pExpr
->
getExprValue
()
->
u
.
lval
+
1
;
m_enumValueCount
=
pExpr
->
getExprValue
()
->
u
.
lval
+
1
;
return
NULL
;
return
nullptr
;
}
}
bool
AstEnum
::
dump
(
RegistryKey
&
rKey
)
bool
AstEnum
::
dump
(
RegistryKey
&
rKey
)
...
...
idlc/source/astexpression.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -33,8 +33,8 @@ AstExpression::AstExpression(ExprComb c, AstExpression *pExpr1, AstExpression *p
...
@@ -33,8 +33,8 @@ AstExpression::AstExpression(ExprComb c, AstExpression *pExpr1, AstExpression *p
:
m_combOperator
(
c
)
:
m_combOperator
(
c
)
,
m_subExpr1
(
pExpr1
)
,
m_subExpr1
(
pExpr1
)
,
m_subExpr2
(
pExpr2
)
,
m_subExpr2
(
pExpr2
)
,
m_exprValue
(
NULL
)
,
m_exprValue
(
nullptr
)
,
m_pSymbolicName
(
NULL
)
,
m_pSymbolicName
(
nullptr
)
{
{
fillDefinitionDetails
();
fillDefinitionDetails
();
...
@@ -42,10 +42,10 @@ AstExpression::AstExpression(ExprComb c, AstExpression *pExpr1, AstExpression *p
...
@@ -42,10 +42,10 @@ AstExpression::AstExpression(ExprComb c, AstExpression *pExpr1, AstExpression *p
AstExpression
::
AstExpression
(
sal_Int32
l
)
AstExpression
::
AstExpression
(
sal_Int32
l
)
:
m_combOperator
(
EC_none
)
:
m_combOperator
(
EC_none
)
,
m_subExpr1
(
NULL
)
,
m_subExpr1
(
nullptr
)
,
m_subExpr2
(
NULL
)
,
m_subExpr2
(
nullptr
)
,
m_exprValue
(
NULL
)
,
m_exprValue
(
nullptr
)
,
m_pSymbolicName
(
NULL
)
,
m_pSymbolicName
(
nullptr
)
{
{
fillDefinitionDetails
();
fillDefinitionDetails
();
...
@@ -56,10 +56,10 @@ AstExpression::AstExpression(sal_Int32 l)
...
@@ -56,10 +56,10 @@ AstExpression::AstExpression(sal_Int32 l)
AstExpression
::
AstExpression
(
sal_Int32
l
,
ExprType
et
)
AstExpression
::
AstExpression
(
sal_Int32
l
,
ExprType
et
)
:
m_combOperator
(
EC_none
)
:
m_combOperator
(
EC_none
)
,
m_subExpr1
(
NULL
)
,
m_subExpr1
(
nullptr
)
,
m_subExpr2
(
NULL
)
,
m_subExpr2
(
nullptr
)
,
m_exprValue
(
NULL
)
,
m_exprValue
(
nullptr
)
,
m_pSymbolicName
(
NULL
)
,
m_pSymbolicName
(
nullptr
)
{
{
fillDefinitionDetails
();
fillDefinitionDetails
();
...
@@ -70,10 +70,10 @@ AstExpression::AstExpression(sal_Int32 l, ExprType et)
...
@@ -70,10 +70,10 @@ AstExpression::AstExpression(sal_Int32 l, ExprType et)
AstExpression
::
AstExpression
(
sal_Int64
h
)
AstExpression
::
AstExpression
(
sal_Int64
h
)
:
m_combOperator
(
EC_none
)
:
m_combOperator
(
EC_none
)
,
m_subExpr1
(
NULL
)
,
m_subExpr1
(
nullptr
)
,
m_subExpr2
(
NULL
)
,
m_subExpr2
(
nullptr
)
,
m_exprValue
(
NULL
)
,
m_exprValue
(
nullptr
)
,
m_pSymbolicName
(
NULL
)
,
m_pSymbolicName
(
nullptr
)
{
{
fillDefinitionDetails
();
fillDefinitionDetails
();
...
@@ -84,10 +84,10 @@ AstExpression::AstExpression(sal_Int64 h)
...
@@ -84,10 +84,10 @@ AstExpression::AstExpression(sal_Int64 h)
AstExpression
::
AstExpression
(
sal_uInt64
uh
)
AstExpression
::
AstExpression
(
sal_uInt64
uh
)
:
m_combOperator
(
EC_none
)
:
m_combOperator
(
EC_none
)
,
m_subExpr1
(
NULL
)
,
m_subExpr1
(
nullptr
)
,
m_subExpr2
(
NULL
)
,
m_subExpr2
(
nullptr
)
,
m_exprValue
(
NULL
)
,
m_exprValue
(
nullptr
)
,
m_pSymbolicName
(
NULL
)
,
m_pSymbolicName
(
nullptr
)
{
{
fillDefinitionDetails
();
fillDefinitionDetails
();
...
@@ -98,10 +98,10 @@ AstExpression::AstExpression(sal_uInt64 uh)
...
@@ -98,10 +98,10 @@ AstExpression::AstExpression(sal_uInt64 uh)
AstExpression
::
AstExpression
(
double
d
)
AstExpression
::
AstExpression
(
double
d
)
:
m_combOperator
(
EC_none
)
:
m_combOperator
(
EC_none
)
,
m_subExpr1
(
NULL
)
,
m_subExpr1
(
nullptr
)
,
m_subExpr2
(
NULL
)
,
m_subExpr2
(
nullptr
)
,
m_exprValue
(
NULL
)
,
m_exprValue
(
nullptr
)
,
m_pSymbolicName
(
NULL
)
,
m_pSymbolicName
(
nullptr
)
{
{
fillDefinitionDetails
();
fillDefinitionDetails
();
...
@@ -112,9 +112,9 @@ AstExpression::AstExpression(double d)
...
@@ -112,9 +112,9 @@ AstExpression::AstExpression(double d)
AstExpression
::
AstExpression
(
OString
*
scopedName
)
AstExpression
::
AstExpression
(
OString
*
scopedName
)
:
m_combOperator
(
EC_symbol
)
:
m_combOperator
(
EC_symbol
)
,
m_subExpr1
(
NULL
)
,
m_subExpr1
(
nullptr
)
,
m_subExpr2
(
NULL
)
,
m_subExpr2
(
nullptr
)
,
m_exprValue
(
NULL
)
,
m_exprValue
(
nullptr
)
,
m_pSymbolicName
(
scopedName
)
,
m_pSymbolicName
(
scopedName
)
{
{
fillDefinitionDetails
();
fillDefinitionDetails
();
...
@@ -136,7 +136,7 @@ AstExpression::~AstExpression()
...
@@ -136,7 +136,7 @@ AstExpression::~AstExpression()
static
bool
static
bool
coerce_value
(
AstExprValue
*
ev
,
ExprType
t
)
coerce_value
(
AstExprValue
*
ev
,
ExprType
t
)
{
{
if
(
ev
==
NULL
)
if
(
ev
==
nullptr
)
return
false
;
return
false
;
switch
(
t
)
switch
(
t
)
...
@@ -692,7 +692,7 @@ bool AstExpression::coerce(ExprType t)
...
@@ -692,7 +692,7 @@ bool AstExpression::coerce(ExprType t)
/*
/*
* Is it already of the right type?
* Is it already of the right type?
*/
*/
if
(
m_exprValue
!=
NULL
&&
m_exprValue
->
et
==
t
)
if
(
m_exprValue
!=
nullptr
&&
m_exprValue
->
et
==
t
)
return
true
;
return
true
;
/*
/*
* OK, must coerce
* OK, must coerce
...
@@ -701,7 +701,7 @@ bool AstExpression::coerce(ExprType t)
...
@@ -701,7 +701,7 @@ bool AstExpression::coerce(ExprType t)
* If already evaluated, return the result
* If already evaluated, return the result
*/
*/
evaluate
();
evaluate
();
if
(
m_exprValue
==
NULL
)
if
(
m_exprValue
==
nullptr
)
return
false
;
return
false
;
/*
/*
...
@@ -765,7 +765,7 @@ bool AstExpression::operator==(AstExpression *pExpr)
...
@@ -765,7 +765,7 @@ bool AstExpression::operator==(AstExpression *pExpr)
return
bRet
;
return
bRet
;
evaluate
();
evaluate
();
pExpr
->
evaluate
();
pExpr
->
evaluate
();
if
(
m_exprValue
==
NULL
||
pExpr
->
getExprValue
()
==
NULL
)
if
(
m_exprValue
==
nullptr
||
pExpr
->
getExprValue
()
==
nullptr
)
return
bRet
;
return
bRet
;
if
(
m_exprValue
->
et
!=
pExpr
->
getExprValue
()
->
et
)
if
(
m_exprValue
->
et
!=
pExpr
->
getExprValue
()
->
et
)
return
bRet
;
return
bRet
;
...
@@ -817,7 +817,7 @@ bool AstExpression::compare(AstExpression *pExpr)
...
@@ -817,7 +817,7 @@ bool AstExpression::compare(AstExpression *pExpr)
return
bRet
;
return
bRet
;
evaluate
();
evaluate
();
pExpr
->
evaluate
();
pExpr
->
evaluate
();
if
(
m_exprValue
==
NULL
||
pExpr
->
getExprValue
()
==
NULL
)
if
(
m_exprValue
==
nullptr
||
pExpr
->
getExprValue
()
==
nullptr
)
return
bRet
;
return
bRet
;
if
(
m_exprValue
->
et
!=
pExpr
->
getExprValue
()
->
et
)
if
(
m_exprValue
->
et
!=
pExpr
->
getExprValue
()
->
et
)
return
bRet
;
return
bRet
;
...
@@ -863,7 +863,7 @@ bool AstExpression::compare(AstExpression *pExpr)
...
@@ -863,7 +863,7 @@ bool AstExpression::compare(AstExpression *pExpr)
void
AstExpression
::
fillDefinitionDetails
()
void
AstExpression
::
fillDefinitionDetails
()
{
{
m_pScope
=
idlc
()
->
scopes
()
->
depth
()
>
0
?
idlc
()
->
scopes
()
->
top
()
:
NULL
;
m_pScope
=
idlc
()
->
scopes
()
->
depth
()
>
0
?
idlc
()
->
scopes
()
->
top
()
:
nullptr
;
m_lineNo
=
idlc
()
->
getLineNumber
();
m_lineNo
=
idlc
()
->
getLineNumber
();
m_fileName
=
idlc
()
->
getFileName
();
m_fileName
=
idlc
()
->
getFileName
();
}
}
...
@@ -873,7 +873,7 @@ void AstExpression::evaluate()
...
@@ -873,7 +873,7 @@ void AstExpression::evaluate()
/*
/*
* Already evaluated?
* Already evaluated?
*/
*/
if
(
m_exprValue
!=
NULL
)
if
(
m_exprValue
!=
nullptr
)
return
;
return
;
/*
/*
* OK, must evaluate operator
* OK, must evaluate operator
...
@@ -914,18 +914,18 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
...
@@ -914,18 +914,18 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
if
(
m_combOperator
==
EC_mod
)
if
(
m_combOperator
==
EC_mod
)
eType
=
ET_hyper
;
eType
=
ET_hyper
;
if
(
m_subExpr1
==
NULL
||
m_subExpr2
==
NULL
)
if
(
m_subExpr1
==
nullptr
||
m_subExpr2
==
nullptr
)
return
NULL
;
return
nullptr
;
m_subExpr1
->
evaluate
();
m_subExpr1
->
evaluate
();
if
(
m_subExpr1
->
getExprValue
()
==
NULL
)
if
(
m_subExpr1
->
getExprValue
()
==
nullptr
)
return
NULL
;
return
nullptr
;
if
(
!
m_subExpr1
->
coerce
(
eType
))
if
(
!
m_subExpr1
->
coerce
(
eType
))
return
NULL
;
return
nullptr
;
m_subExpr2
->
evaluate
();
m_subExpr2
->
evaluate
();
if
(
m_subExpr2
->
getExprValue
()
==
NULL
)
if
(
m_subExpr2
->
getExprValue
()
==
nullptr
)
return
NULL
;
return
nullptr
;
if
(
!
m_subExpr2
->
coerce
(
eType
))
if
(
!
m_subExpr2
->
coerce
(
eType
))
return
NULL
;
return
nullptr
;
std
::
unique_ptr
<
AstExprValue
>
retval
(
new
AstExprValue
());
std
::
unique_ptr
<
AstExprValue
>
retval
(
new
AstExprValue
());
retval
->
et
=
eType
;
retval
->
et
=
eType
;
...
@@ -934,7 +934,7 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
...
@@ -934,7 +934,7 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
{
{
case
EC_mod
:
case
EC_mod
:
if
(
m_subExpr2
->
getExprValue
()
->
u
.
hval
==
0
)
if
(
m_subExpr2
->
getExprValue
()
->
u
.
hval
==
0
)
return
NULL
;
return
nullptr
;
retval
->
u
.
hval
=
m_subExpr1
->
getExprValue
()
->
u
.
hval
%
m_subExpr2
->
getExprValue
()
->
u
.
hval
;
retval
->
u
.
hval
=
m_subExpr1
->
getExprValue
()
->
u
.
hval
%
m_subExpr2
->
getExprValue
()
->
u
.
hval
;
break
;
break
;
case
EC_add
:
case
EC_add
:
...
@@ -948,11 +948,11 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
...
@@ -948,11 +948,11 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
break
;
break
;
case
EC_div
:
case
EC_div
:
if
(
m_subExpr2
->
getExprValue
()
->
u
.
dval
==
0.0
)
if
(
m_subExpr2
->
getExprValue
()
->
u
.
dval
==
0.0
)
return
NULL
;
return
nullptr
;
retval
->
u
.
dval
=
m_subExpr1
->
getExprValue
()
->
u
.
dval
/
m_subExpr2
->
getExprValue
()
->
u
.
dval
;
retval
->
u
.
dval
=
m_subExpr1
->
getExprValue
()
->
u
.
dval
/
m_subExpr2
->
getExprValue
()
->
u
.
dval
;
break
;
break
;
default
:
default
:
return
NULL
;
return
nullptr
;
}
}
return
retval
;
return
retval
;
...
@@ -960,18 +960,18 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
...
@@ -960,18 +960,18 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
std
::
unique_ptr
<
AstExprValue
>
AstExpression
::
eval_bit_op
()
std
::
unique_ptr
<
AstExprValue
>
AstExpression
::
eval_bit_op
()
{
{
if
(
m_subExpr1
==
NULL
||
m_subExpr2
==
NULL
)
if
(
m_subExpr1
==
nullptr
||
m_subExpr2
==
nullptr
)
return
NULL
;
return
nullptr
;
m_subExpr1
->
evaluate
();
m_subExpr1
->
evaluate
();
if
(
m_subExpr1
->
getExprValue
()
==
NULL
)
if
(
m_subExpr1
->
getExprValue
()
==
nullptr
)
return
NULL
;
return
nullptr
;
if
(
!
m_subExpr1
->
coerce
(
ET_long
))
if
(
!
m_subExpr1
->
coerce
(
ET_long
))
return
NULL
;
return
nullptr
;
m_subExpr2
->
evaluate
();
m_subExpr2
->
evaluate
();
if
(
m_subExpr2
->
getExprValue
()
==
NULL
)
if
(
m_subExpr2
->
getExprValue
()
==
nullptr
)
return
NULL
;
return
nullptr
;
if
(
!
m_subExpr2
->
coerce
(
ET_long
))
if
(
!
m_subExpr2
->
coerce
(
ET_long
))
return
NULL
;
return
nullptr
;
std
::
unique_ptr
<
AstExprValue
>
retval
(
new
AstExprValue
());
std
::
unique_ptr
<
AstExprValue
>
retval
(
new
AstExprValue
());
retval
->
et
=
ET_long
;
retval
->
et
=
ET_long
;
...
@@ -994,7 +994,7 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bit_op()
...
@@ -994,7 +994,7 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bit_op()
retval
->
u
.
lval
=
m_subExpr1
->
getExprValue
()
->
u
.
lval
>>
m_subExpr2
->
getExprValue
()
->
u
.
lval
;
retval
->
u
.
lval
=
m_subExpr1
->
getExprValue
()
->
u
.
lval
>>
m_subExpr2
->
getExprValue
()
->
u
.
lval
;
break
;
break
;
default
:
default
:
return
NULL
;
return
nullptr
;
}
}
return
retval
;
return
retval
;
...
@@ -1002,13 +1002,13 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bit_op()
...
@@ -1002,13 +1002,13 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bit_op()
std
::
unique_ptr
<
AstExprValue
>
AstExpression
::
eval_un_op
()
std
::
unique_ptr
<
AstExprValue
>
AstExpression
::
eval_un_op
()
{
{
if
(
m_subExpr1
==
NULL
)
if
(
m_subExpr1
==
nullptr
)
return
NULL
;
return
nullptr
;
m_subExpr1
->
evaluate
();
m_subExpr1
->
evaluate
();
if
(
m_subExpr1
->
getExprValue
()
==
NULL
)
if
(
m_subExpr1
->
getExprValue
()
==
nullptr
)
return
NULL
;
return
nullptr
;
if
(
!
m_subExpr1
->
coerce
(
ET_double
))
if
(
!
m_subExpr1
->
coerce
(
ET_double
))
return
NULL
;
return
nullptr
;
std
::
unique_ptr
<
AstExprValue
>
retval
(
new
AstExprValue
());
std
::
unique_ptr
<
AstExprValue
>
retval
(
new
AstExprValue
());
retval
->
et
=
ET_double
;
retval
->
et
=
ET_double
;
...
@@ -1023,11 +1023,11 @@ std::unique_ptr<AstExprValue> AstExpression::eval_un_op()
...
@@ -1023,11 +1023,11 @@ std::unique_ptr<AstExprValue> AstExpression::eval_un_op()
break
;
break
;
case
EC_bit_neg
:
case
EC_bit_neg
:
if
(
!
m_subExpr1
->
coerce
(
ET_long
))
if
(
!
m_subExpr1
->
coerce
(
ET_long
))
return
NULL
;
return
nullptr
;
retval
->
u
.
lval
=
~
m_subExpr1
->
getExprValue
()
->
u
.
lval
;
retval
->
u
.
lval
=
~
m_subExpr1
->
getExprValue
()
->
u
.
lval
;
break
;
break
;
default
:
default
:
return
NULL
;
return
nullptr
;
}
}
return
retval
;
return
retval
;
...
@@ -1035,17 +1035,17 @@ std::unique_ptr<AstExprValue> AstExpression::eval_un_op()
...
@@ -1035,17 +1035,17 @@ std::unique_ptr<AstExprValue> AstExpression::eval_un_op()
AstExprValue
*
AstExpression
::
eval_symbol
()
AstExprValue
*
AstExpression
::
eval_symbol
()
{
{
AstScope
*
pScope
=
0
;
AstScope
*
pScope
=
nullptr
;
AstDeclaration
*
pDecl
;
AstDeclaration
*
pDecl
;
AstConstant
*
pConst
;
AstConstant
*
pConst
;
/*
/*
* Is there a symbol stored?
* Is there a symbol stored?
*/
*/
if
(
m_pSymbolicName
==
NULL
)
if
(
m_pSymbolicName
==
nullptr
)
{
{
ErrorHandler
::
evalError
(
this
);
ErrorHandler
::
evalError
(
this
);
return
NULL
;
return
nullptr
;
}
}
/*
/*
* Get current scope for lookup
* Get current scope for lookup
...
@@ -1055,16 +1055,16 @@ AstExprValue* AstExpression::eval_symbol()
...
@@ -1055,16 +1055,16 @@ AstExprValue* AstExpression::eval_symbol()
if
(
!
pScope
)
if
(
!
pScope
)
{
{
ErrorHandler
::
lookupError
(
*
m_pSymbolicName
);
ErrorHandler
::
lookupError
(
*
m_pSymbolicName
);
return
NULL
;
return
nullptr
;
}
}
/*
/*
* Do lookup
* Do lookup
*/
*/
pDecl
=
pScope
->
lookupByName
(
*
m_pSymbolicName
);
pDecl
=
pScope
->
lookupByName
(
*
m_pSymbolicName
);
if
(
pDecl
==
NULL
)
if
(
pDecl
==
nullptr
)
{
{
ErrorHandler
::
lookupError
(
*
m_pSymbolicName
);
ErrorHandler
::
lookupError
(
*
m_pSymbolicName
);
return
NULL
;
return
nullptr
;
}
}
/*
/*
* Is it a constant?
* Is it a constant?
...
@@ -1073,11 +1073,11 @@ AstExprValue* AstExpression::eval_symbol()
...
@@ -1073,11 +1073,11 @@ AstExprValue* AstExpression::eval_symbol()
pDecl
->
getNodeType
()
!=
NT_enum_val
)
pDecl
->
getNodeType
()
!=
NT_enum_val
)
{
{
ErrorHandler
::
constantExpected
(
pDecl
,
*
m_pSymbolicName
);
ErrorHandler
::
constantExpected
(
pDecl
,
*
m_pSymbolicName
);
return
NULL
;
return
nullptr
;
}
}
if
(
!
ErrorHandler
::
checkPublished
(
pDecl
))
if
(
!
ErrorHandler
::
checkPublished
(
pDecl
))
{
{
return
NULL
;
return
nullptr
;
}
}
/*
/*
* OK, now evaluate the constant we just got, to produce its value
* OK, now evaluate the constant we just got, to produce its value
...
...
idlc/source/astinterface.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -34,9 +34,9 @@ AstInterface::AstInterface(const OString& name,
...
@@ -34,9 +34,9 @@ AstInterface::AstInterface(const OString& name,
,
AstScope
(
NT_interface
)
,
AstScope
(
NT_interface
)
,
m_mandatoryInterfaces
(
0
)
,
m_mandatoryInterfaces
(
0
)
,
m_bIsDefined
(
false
)
,
m_bIsDefined
(
false
)
,
m_bSingleInheritance
(
pInherits
!=
0
)
,
m_bSingleInheritance
(
pInherits
!=
nullptr
)
{
{
if
(
pInherits
!=
0
)
{
if
(
pInherits
!=
nullptr
)
{
addInheritedInterface
(
pInherits
,
false
,
OUString
());
addInheritedInterface
(
pInherits
,
false
,
OUString
());
}
}
}
}
...
@@ -317,7 +317,7 @@ void AstInterface::checkMemberClashes(
...
@@ -317,7 +317,7 @@ void AstInterface::checkMemberClashes(
VisibleMembers
::
const_iterator
i
(
VisibleMembers
::
const_iterator
i
(
m_visibleMembers
.
find
(
member
->
getLocalName
()));
m_visibleMembers
.
find
(
member
->
getLocalName
()));
if
(
i
!=
m_visibleMembers
.
end
())
{
if
(
i
!=
m_visibleMembers
.
end
())
{
if
(
i
->
second
.
mandatory
!=
0
)
{
if
(
i
->
second
.
mandatory
!=
nullptr
)
{
if
(
i
->
second
.
mandatory
->
getScopedName
()
!=
member
->
getScopedName
())
if
(
i
->
second
.
mandatory
->
getScopedName
()
!=
member
->
getScopedName
())
{
{
DoubleMemberDeclaration
d
;
DoubleMemberDeclaration
d
;
...
@@ -383,7 +383,7 @@ void AstInterface::addOptionalVisibleMembers(AstInterface const * ifc) {
...
@@ -383,7 +383,7 @@ void AstInterface::addOptionalVisibleMembers(AstInterface const * ifc) {
VisibleMembers
::
value_type
(
VisibleMembers
::
value_type
(
(
*
i
)
->
getLocalName
(),
VisibleMember
())).
first
;
(
*
i
)
->
getLocalName
(),
VisibleMember
())).
first
;
}
}
if
(
visible
->
second
.
mandatory
==
0
)
{
if
(
visible
->
second
.
mandatory
==
nullptr
)
{
visible
->
second
.
optionals
.
insert
(
visible
->
second
.
optionals
.
insert
(
VisibleMember
::
Optionals
::
value_type
(
ifc
->
getScopedName
(),
*
i
));
VisibleMember
::
Optionals
::
value_type
(
ifc
->
getScopedName
(),
*
i
));
}
}
...
...
idlc/source/astoperation.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
void
AstOperation
::
setExceptions
(
DeclList
const
*
pExceptions
)
void
AstOperation
::
setExceptions
(
DeclList
const
*
pExceptions
)
{
{
if
(
pExceptions
!=
0
)
{
if
(
pExceptions
!=
nullptr
)
{
m_exceptions
=
*
pExceptions
;
m_exceptions
=
*
pExceptions
;
}
}
}
}
...
@@ -45,7 +45,7 @@ bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index)
...
@@ -45,7 +45,7 @@ bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index)
RTMethodMode
methodMode
=
RTMethodMode
::
TWOWAY
;
RTMethodMode
methodMode
=
RTMethodMode
::
TWOWAY
;
OUString
returnTypeName
;
OUString
returnTypeName
;
if
(
m_pReturnType
==
0
)
{
if
(
m_pReturnType
==
nullptr
)
{
returnTypeName
=
"void"
;
returnTypeName
=
"void"
;
}
else
{
}
else
{
returnTypeName
=
OStringToOUString
(
returnTypeName
=
OStringToOUString
(
...
...
idlc/source/astscope.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -42,14 +42,14 @@ AstScope::~AstScope()
...
@@ -42,14 +42,14 @@ AstScope::~AstScope()
AstDeclaration
*
AstScope
::
addDeclaration
(
AstDeclaration
*
pDecl
)
AstDeclaration
*
AstScope
::
addDeclaration
(
AstDeclaration
*
pDecl
)
{
{
AstDeclaration
*
pDeclaration
=
NULL
;
AstDeclaration
*
pDeclaration
=
nullptr
;
if
((
pDeclaration
=
lookupForAdd
(
pDecl
))
!=
NULL
)
if
((
pDeclaration
=
lookupForAdd
(
pDecl
))
!=
nullptr
)
{
{
if
(
pDecl
->
hasAncestor
(
pDeclaration
)
)
if
(
pDecl
->
hasAncestor
(
pDeclaration
)
)
{
{
ErrorHandler
::
error2
(
EIDL_REDEF_SCOPE
,
pDecl
,
pDeclaration
);
ErrorHandler
::
error2
(
EIDL_REDEF_SCOPE
,
pDecl
,
pDeclaration
);
return
NULL
;
return
nullptr
;
}
}
if
(
(
pDecl
->
getNodeType
()
==
pDeclaration
->
getNodeType
())
&&
if
(
(
pDecl
->
getNodeType
()
==
pDeclaration
->
getNodeType
())
&&
(
pDecl
->
getNodeType
()
==
NT_sequence
(
pDecl
->
getNodeType
()
==
NT_sequence
...
@@ -76,7 +76,7 @@ AstDeclaration* AstScope::addDeclaration(AstDeclaration* pDecl)
...
@@ -76,7 +76,7 @@ AstDeclaration* AstScope::addDeclaration(AstDeclaration* pDecl)
}
}
ErrorHandler
::
error2
(
EIDL_REDEF_SCOPE
,
scopeAsDecl
(
this
),
pDecl
);
ErrorHandler
::
error2
(
EIDL_REDEF_SCOPE
,
scopeAsDecl
(
this
),
pDecl
);
return
NULL
;
return
nullptr
;
}
}
m_declarations
.
push_back
(
pDecl
);
m_declarations
.
push_back
(
pDecl
);
...
@@ -101,17 +101,17 @@ sal_uInt16 AstScope::getNodeCount(NodeType nodeType)
...
@@ -101,17 +101,17 @@ sal_uInt16 AstScope::getNodeCount(NodeType nodeType)
AstDeclaration
*
AstScope
::
lookupByName
(
const
OString
&
scopedName
)
AstDeclaration
*
AstScope
::
lookupByName
(
const
OString
&
scopedName
)
{
{
AstDeclaration
*
pDecl
=
NULL
;
AstDeclaration
*
pDecl
=
nullptr
;
AstScope
*
pScope
=
NULL
;
AstScope
*
pScope
=
nullptr
;
if
(
scopedName
.
isEmpty
())
if
(
scopedName
.
isEmpty
())
return
NULL
;
return
nullptr
;
// If name starts with "::" start look up in global scope
// If name starts with "::" start look up in global scope
if
(
isGlobal
(
scopedName
)
)
if
(
isGlobal
(
scopedName
)
)
{
{
pDecl
=
scopeAsDecl
(
this
);
pDecl
=
scopeAsDecl
(
this
);
if
(
!
pDecl
)
if
(
!
pDecl
)
return
NULL
;
return
nullptr
;
pScope
=
pDecl
->
getScope
();
pScope
=
pDecl
->
getScope
();
// If this is the global scope ...
// If this is the global scope ...
...
@@ -146,7 +146,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
...
@@ -146,7 +146,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
if
(
pScope
)
if
(
pScope
)
pDecl
=
pScope
->
lookupByName
(
scopedName
);
pDecl
=
pScope
->
lookupByName
(
scopedName
);
else
else
pDecl
=
NULL
;
pDecl
=
nullptr
;
// Special case for scope which is an interface. We
// Special case for scope which is an interface. We
// have to look in the inherited interfaces as well.
// have to look in the inherited interfaces as well.
...
@@ -185,7 +185,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
...
@@ -185,7 +185,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
pDecl
=
pScope
->
lookupByName
(
scopedName
);
pDecl
=
pScope
->
lookupByName
(
scopedName
);
}
else
}
else
{
{
pDecl
=
NULL
;
pDecl
=
nullptr
;
}
}
}
}
...
@@ -206,7 +206,7 @@ AstDeclaration* AstScope::lookupByNameLocal(const OString& name) const
...
@@ -206,7 +206,7 @@ AstDeclaration* AstScope::lookupByNameLocal(const OString& name) const
return
pDecl
;
return
pDecl
;
++
iter
;
++
iter
;
}
}
return
NULL
;
return
nullptr
;
}
}
AstDeclaration
*
AstScope
::
lookupInInherited
(
const
OString
&
scopedName
)
const
AstDeclaration
*
AstScope
::
lookupInInherited
(
const
OString
&
scopedName
)
const
...
@@ -214,7 +214,7 @@ AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) const
...
@@ -214,7 +214,7 @@ AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) const
const
AstInterface
*
pInterface
=
dynamic_cast
<
const
AstInterface
*>
(
this
);
const
AstInterface
*
pInterface
=
dynamic_cast
<
const
AstInterface
*>
(
this
);
if
(
!
pInterface
)
if
(
!
pInterface
)
return
NULL
;
return
nullptr
;
// Can't look in an interface which was not yet defined
// Can't look in an interface which was not yet defined
if
(
!
pInterface
->
getScope
()
)
if
(
!
pInterface
->
getScope
()
)
...
@@ -239,17 +239,17 @@ AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) const
...
@@ -239,17 +239,17 @@ AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) const
++
iter
;
++
iter
;
}
}
// Not found
// Not found
return
NULL
;
return
nullptr
;
}
}
AstDeclaration
*
AstScope
::
lookupPrimitiveType
(
ExprType
type
)
AstDeclaration
*
AstScope
::
lookupPrimitiveType
(
ExprType
type
)
{
{
AstDeclaration
*
pDecl
=
NULL
;
AstDeclaration
*
pDecl
=
nullptr
;
AstScope
*
pScope
=
NULL
;
AstScope
*
pScope
=
nullptr
;
OString
typeName
;
OString
typeName
;
pDecl
=
scopeAsDecl
(
this
);
pDecl
=
scopeAsDecl
(
this
);
if
(
!
pDecl
)
if
(
!
pDecl
)
return
NULL
;
return
nullptr
;
pScope
=
pDecl
->
getScope
();
pScope
=
pDecl
->
getScope
();
if
(
pScope
)
if
(
pScope
)
return
pScope
->
lookupPrimitiveType
(
type
);
return
pScope
->
lookupPrimitiveType
(
type
);
...
@@ -316,13 +316,13 @@ AstDeclaration* AstScope::lookupPrimitiveType(ExprType type)
...
@@ -316,13 +316,13 @@ AstDeclaration* AstScope::lookupPrimitiveType(ExprType type)
return
pDecl
;
return
pDecl
;
}
}
return
NULL
;
return
nullptr
;
}
}
AstDeclaration
*
AstScope
::
lookupForAdd
(
AstDeclaration
*
pDecl
)
AstDeclaration
*
AstScope
::
lookupForAdd
(
AstDeclaration
*
pDecl
)
{
{
if
(
!
pDecl
)
if
(
!
pDecl
)
return
NULL
;
return
nullptr
;
AstDeclaration
*
pRetDecl
=
lookupByNameLocal
(
pDecl
->
getLocalName
());
AstDeclaration
*
pRetDecl
=
lookupByNameLocal
(
pDecl
->
getLocalName
());
...
...
idlc/source/aststack.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -45,14 +45,14 @@ AstStack::~AstStack()
...
@@ -45,14 +45,14 @@ AstStack::~AstStack()
AstScope
*
AstStack
::
top
()
AstScope
*
AstStack
::
top
()
{
{
if
(
m_top
<
1
)
if
(
m_top
<
1
)
return
NULL
;
return
nullptr
;
return
m_stack
[
m_top
-
1
];
return
m_stack
[
m_top
-
1
];
}
}
AstScope
*
AstStack
::
bottom
()
AstScope
*
AstStack
::
bottom
()
{
{
if
(
m_top
==
0
)
if
(
m_top
==
0
)
return
NULL
;
return
nullptr
;
return
m_stack
[
0
];
return
m_stack
[
0
];
}
}
...
@@ -61,7 +61,7 @@ AstScope* AstStack::nextToTop()
...
@@ -61,7 +61,7 @@ AstScope* AstStack::nextToTop()
AstScope
*
tmp
,
*
retval
;
AstScope
*
tmp
,
*
retval
;
if
(
depth
()
<
2
)
if
(
depth
()
<
2
)
return
NULL
;
return
nullptr
;
tmp
=
top
();
// Save top
tmp
=
top
();
// Save top
(
void
)
pop
();
// Pop it
(
void
)
pop
();
// Pop it
...
@@ -77,7 +77,7 @@ AstScope* AstStack::topNonNull()
...
@@ -77,7 +77,7 @@ AstScope* AstStack::topNonNull()
if
(
m_stack
[
i
-
1
]
)
if
(
m_stack
[
i
-
1
]
)
return
m_stack
[
i
-
1
];
return
m_stack
[
i
-
1
];
}
}
return
NULL
;
return
nullptr
;
}
}
AstStack
*
AstStack
::
push
(
AstScope
*
pScope
)
AstStack
*
AstStack
::
push
(
AstScope
*
pScope
)
...
...
idlc/source/aststruct.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -34,7 +34,7 @@ AstStruct::AstStruct(
...
@@ -34,7 +34,7 @@ AstStruct::AstStruct(
i
!=
typeParameters
.
end
();
++
i
)
i
!=
typeParameters
.
end
();
++
i
)
{
{
m_typeParameters
.
push_back
(
m_typeParameters
.
push_back
(
new
AstType
(
NT_type_parameter
,
*
i
,
0
));
new
AstType
(
NT_type_parameter
,
*
i
,
nullptr
));
}
}
}
}
...
@@ -67,7 +67,7 @@ AstDeclaration const * AstStruct::findTypeParameter(OString const & name)
...
@@ -67,7 +67,7 @@ AstDeclaration const * AstStruct::findTypeParameter(OString const & name)
return
*
i
;
return
*
i
;
}
}
}
}
return
0
;
return
nullptr
;
}
}
bool
AstStruct
::
isType
()
const
{
bool
AstStruct
::
isType
()
const
{
...
@@ -108,9 +108,9 @@ bool AstStruct::dump(RegistryKey& rKey)
...
@@ -108,9 +108,9 @@ bool AstStruct::dump(RegistryKey& rKey)
?
TYPEREG_VERSION_0
:
TYPEREG_VERSION_1
),
?
TYPEREG_VERSION_0
:
TYPEREG_VERSION_1
),
getDocumentation
(),
emptyStr
,
typeClass
,
m_bPublished
,
getDocumentation
(),
emptyStr
,
typeClass
,
m_bPublished
,
OStringToOUString
(
getRelativName
(),
RTL_TEXTENCODING_UTF8
),
OStringToOUString
(
getRelativName
(),
RTL_TEXTENCODING_UTF8
),
m_pBaseType
==
0
?
0
:
1
,
nMember
,
0
,
m_pBaseType
==
nullptr
?
0
:
1
,
nMember
,
0
,
static_cast
<
sal_uInt16
>
(
m_typeParameters
.
size
()));
static_cast
<
sal_uInt16
>
(
m_typeParameters
.
size
()));
if
(
m_pBaseType
!=
0
)
{
if
(
m_pBaseType
!=
nullptr
)
{
aBlob
.
setSuperTypeName
(
aBlob
.
setSuperTypeName
(
0
,
0
,
OStringToOUString
(
OStringToOUString
(
...
@@ -121,7 +121,7 @@ bool AstStruct::dump(RegistryKey& rKey)
...
@@ -121,7 +121,7 @@ bool AstStruct::dump(RegistryKey& rKey)
{
{
DeclList
::
const_iterator
iter
=
getIteratorBegin
();
DeclList
::
const_iterator
iter
=
getIteratorBegin
();
DeclList
::
const_iterator
end
=
getIteratorEnd
();
DeclList
::
const_iterator
end
=
getIteratorEnd
();
AstMember
*
pMember
=
NULL
;
AstMember
*
pMember
=
nullptr
;
sal_uInt16
index
=
0
;
sal_uInt16
index
=
0
;
while
(
iter
!=
end
)
while
(
iter
!=
end
)
{
{
...
...
idlc/source/aststructinstance.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -32,7 +32,7 @@ OString createName(
...
@@ -32,7 +32,7 @@ OString createName(
AstType
const
*
typeTemplate
,
DeclList
const
*
typeArguments
)
AstType
const
*
typeTemplate
,
DeclList
const
*
typeArguments
)
{
{
OStringBuffer
buf
(
typeTemplate
->
getScopedName
());
OStringBuffer
buf
(
typeTemplate
->
getScopedName
());
if
(
typeArguments
!=
0
)
{
if
(
typeArguments
!=
nullptr
)
{
buf
.
append
(
'<'
);
buf
.
append
(
'<'
);
for
(
DeclList
::
const_iterator
i
(
typeArguments
->
begin
());
for
(
DeclList
::
const_iterator
i
(
typeArguments
->
begin
());
i
!=
typeArguments
->
end
();
++
i
)
i
!=
typeArguments
->
end
();
++
i
)
...
@@ -40,7 +40,7 @@ OString createName(
...
@@ -40,7 +40,7 @@ OString createName(
if
(
i
!=
typeArguments
->
begin
())
{
if
(
i
!=
typeArguments
->
begin
())
{
buf
.
append
(
','
);
buf
.
append
(
','
);
}
}
if
(
*
i
!=
0
)
{
if
(
*
i
!=
nullptr
)
{
buf
.
append
((
*
i
)
->
getScopedName
());
buf
.
append
((
*
i
)
->
getScopedName
());
}
}
}
}
...
...
idlc/source/fehelper.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -49,20 +49,20 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
...
@@ -49,20 +49,20 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
{
{
const
AstType
*
pType
;
const
AstType
*
pType
;
if
(
pDecl
==
0
)
if
(
pDecl
==
nullptr
)
{
{
return
NULL
;
return
nullptr
;
}
}
if
(
!
pDecl
->
isType
()
)
if
(
!
pDecl
->
isType
()
)
{
{
ErrorHandler
::
noTypeError
(
pDecl
);
ErrorHandler
::
noTypeError
(
pDecl
);
return
NULL
;
return
nullptr
;
}
}
pType
=
static_cast
<
const
AstType
*>
(
pDecl
);
pType
=
static_cast
<
const
AstType
*>
(
pDecl
);
if
(
m_declType
==
FD_simple
||
m_pComplexPart
==
NULL
)
if
(
m_declType
==
FD_simple
||
m_pComplexPart
==
nullptr
)
return
pType
;
return
pType
;
return
NULL
;
// return through this statement should not happen
return
nullptr
;
// return through this statement should not happen
}
}
FeInheritanceHeader
::
FeInheritanceHeader
(
FeInheritanceHeader
::
FeInheritanceHeader
(
...
@@ -70,9 +70,9 @@ FeInheritanceHeader::FeInheritanceHeader(
...
@@ -70,9 +70,9 @@ FeInheritanceHeader::FeInheritanceHeader(
std
::
vector
<
OString
>
*
typeParameters
)
std
::
vector
<
OString
>
*
typeParameters
)
:
m_nodeType
(
nodeType
)
:
m_nodeType
(
nodeType
)
,
m_pName
(
pName
)
,
m_pName
(
pName
)
,
m_pInherits
(
NULL
)
,
m_pInherits
(
nullptr
)
{
{
if
(
typeParameters
!=
0
)
{
if
(
typeParameters
!=
nullptr
)
{
m_typeParameters
=
*
typeParameters
;
m_typeParameters
=
*
typeParameters
;
}
}
initializeInherits
(
pInherits
);
initializeInherits
(
pInherits
);
...
...
idlc/source/idlc.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
AstDeclaration
*
SAL_CALL
scopeAsDecl
(
AstScope
*
pScope
)
AstDeclaration
*
SAL_CALL
scopeAsDecl
(
AstScope
*
pScope
)
{
{
if
(
pScope
==
NULL
)
return
NULL
;
if
(
pScope
==
nullptr
)
return
nullptr
;
switch
(
pScope
->
getScopeNodeType
()
)
switch
(
pScope
->
getScopeNodeType
()
)
{
{
...
@@ -65,13 +65,13 @@ AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope)
...
@@ -65,13 +65,13 @@ AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope)
case
NT_enum
:
case
NT_enum
:
return
static_cast
<
AstEnum
*>
(
pScope
);
return
static_cast
<
AstEnum
*>
(
pScope
);
default:
default:
return
NULL
;
return
nullptr
;
}
}
}
}
AstScope
*
SAL_CALL
declAsScope
(
AstDeclaration
*
pDecl
)
AstScope
*
SAL_CALL
declAsScope
(
AstDeclaration
*
pDecl
)
{
{
if
(
pDecl
==
NULL
)
return
NULL
;
if
(
pDecl
==
nullptr
)
return
nullptr
;
switch
(
pDecl
->
getNodeType
())
switch
(
pDecl
->
getNodeType
())
{
{
...
@@ -94,7 +94,7 @@ AstScope* SAL_CALL declAsScope(AstDeclaration* pDecl)
...
@@ -94,7 +94,7 @@ AstScope* SAL_CALL declAsScope(AstDeclaration* pDecl)
case
NT_operation
:
case
NT_operation
:
return
static_cast
<
AstOperation
*>
(
pDecl
);
return
static_cast
<
AstOperation
*>
(
pDecl
);
default:
default:
return
NULL
;
return
nullptr
;
}
}
}
}
...
@@ -120,7 +120,7 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot)
...
@@ -120,7 +120,7 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot)
pParentScope
=
pModule
;
pParentScope
=
pModule
;
// define XInterface
// define XInterface
AstInterface
*
pInterface
=
new
AstInterface
(
OString
(
"XInterface"
),
NULL
,
pParentScope
);
AstInterface
*
pInterface
=
new
AstInterface
(
OString
(
"XInterface"
),
nullptr
,
pParentScope
);
pInterface
->
setDefined
();
pInterface
->
setDefined
();
pInterface
->
setPredefined
(
true
);
pInterface
->
setPredefined
(
true
);
pInterface
->
setPublished
();
pInterface
->
setPublished
();
...
@@ -211,7 +211,7 @@ Idlc::Idlc(Options* pOptions)
...
@@ -211,7 +211,7 @@ Idlc::Idlc(Options* pOptions)
{
{
m_pScopes
=
new
AstStack
();
m_pScopes
=
new
AstStack
();
// init root object after construction
// init root object after construction
m_pRoot
=
NULL
;
m_pRoot
=
nullptr
;
m_pErrorHandler
=
new
ErrorHandler
();
m_pErrorHandler
=
new
ErrorHandler
();
m_bGenerateDoc
=
m_pOptions
->
isValid
(
"-C"
);
m_bGenerateDoc
=
m_pOptions
->
isValid
(
"-C"
);
}
}
...
@@ -226,7 +226,7 @@ Idlc::~Idlc()
...
@@ -226,7 +226,7 @@ Idlc::~Idlc()
void
Idlc
::
init
()
void
Idlc
::
init
()
{
{
delete
m_pRoot
;
delete
m_pRoot
;
m_pRoot
=
new
AstModule
(
NT_root
,
OString
(),
NULL
);
m_pRoot
=
new
AstModule
(
NT_root
,
OString
(),
nullptr
);
// push the root node on the stack
// push the root node on the stack
m_pScopes
->
push
(
m_pRoot
);
m_pScopes
->
push
(
m_pRoot
);
...
@@ -253,7 +253,7 @@ void Idlc::reset()
...
@@ -253,7 +253,7 @@ void Idlc::reset()
m_pScopes
->
clear
();
m_pScopes
->
clear
();
delete
m_pRoot
;
delete
m_pRoot
;
m_pRoot
=
new
AstModule
(
NT_root
,
OString
(),
NULL
);
m_pRoot
=
new
AstModule
(
NT_root
,
OString
(),
nullptr
);
// push the root node on the stack
// push the root node on the stack
m_pScopes
->
push
(
m_pRoot
);
m_pScopes
->
push
(
m_pRoot
);
...
@@ -348,7 +348,7 @@ Idlc::dumpDeps(OString const& rDepFile, OString const& rTarget)
...
@@ -348,7 +348,7 @@ Idlc::dumpDeps(OString const& rDepFile, OString const& rTarget)
return
::
osl
::
FileBase
::
E_None
==
rc
;
return
::
osl
::
FileBase
::
E_None
==
rc
;
}
}
static
Idlc
*
pStaticIdlc
=
NULL
;
static
Idlc
*
pStaticIdlc
=
nullptr
;
Idlc
*
SAL_CALL
idlc
()
Idlc
*
SAL_CALL
idlc
()
{
{
...
@@ -364,7 +364,7 @@ Idlc* SAL_CALL setIdlc(Options* pOptions)
...
@@ -364,7 +364,7 @@ Idlc* SAL_CALL setIdlc(Options* pOptions)
}
}
AstDeclaration
const
*
resolveTypedefs
(
AstDeclaration
const
*
type
)
{
AstDeclaration
const
*
resolveTypedefs
(
AstDeclaration
const
*
type
)
{
if
(
type
!=
0
)
{
if
(
type
!=
nullptr
)
{
while
(
type
->
getNodeType
()
==
NT_typedef
)
{
while
(
type
->
getNodeType
()
==
NT_typedef
)
{
type
=
static_cast
<
AstTypeDef
const
*
>
(
type
)
->
getBaseType
();
type
=
static_cast
<
AstTypeDef
const
*
>
(
type
)
->
getBaseType
();
}
}
...
@@ -377,8 +377,8 @@ AstDeclaration const * deconstructAndResolveTypedefs(
...
@@ -377,8 +377,8 @@ AstDeclaration const * deconstructAndResolveTypedefs(
{
{
*
rank
=
0
;
*
rank
=
0
;
for
(;;)
{
for
(;;)
{
if
(
type
==
0
)
{
if
(
type
==
nullptr
)
{
return
0
;
return
nullptr
;
}
}
switch
(
type
->
getNodeType
())
{
switch
(
type
->
getNodeType
())
{
case
NT_typedef
:
case
NT_typedef
:
...
...
idlc/source/idlccompile.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -174,7 +174,7 @@ bool copyFile(const OString* source, const OString& target)
...
@@ -174,7 +174,7 @@ bool copyFile(const OString* source, const OString& target)
{
{
bool
bRet
=
true
;
bool
bRet
=
true
;
FILE
*
pSource
=
source
==
0
?
stdin
:
fopen
(
source
->
getStr
(),
"rb"
);
FILE
*
pSource
=
source
==
nullptr
?
stdin
:
fopen
(
source
->
getStr
(),
"rb"
);
if
(
!
pSource
)
if
(
!
pSource
)
return
false
;
return
false
;
...
@@ -195,7 +195,7 @@ bool copyFile(const OString* source, const OString& target)
...
@@ -195,7 +195,7 @@ bool copyFile(const OString* source, const OString& target)
{
{
if
(
(
fwrite
(
pBuffer
,
1
,
readSize
,
pTarget
))
!=
readSize
||
ferror
(
pTarget
)
)
if
(
(
fwrite
(
pBuffer
,
1
,
readSize
,
pTarget
))
!=
readSize
||
ferror
(
pTarget
)
)
{
{
if
(
source
!=
0
)
{
if
(
source
!=
nullptr
)
{
fclose
(
pSource
);
fclose
(
pSource
);
}
}
fclose
(
pTarget
);
fclose
(
pTarget
);
...
@@ -204,7 +204,7 @@ bool copyFile(const OString* source, const OString& target)
...
@@ -204,7 +204,7 @@ bool copyFile(const OString* source, const OString& target)
}
}
}
}
if
(
source
!=
0
)
{
if
(
source
!=
nullptr
)
{
fclose
(
pSource
);
fclose
(
pSource
);
}
}
if
(
fflush
(
pTarget
)
)
if
(
fflush
(
pTarget
)
)
...
@@ -221,7 +221,7 @@ sal_Int32 compileFile(const OString * pathname)
...
@@ -221,7 +221,7 @@ sal_Int32 compileFile(const OString * pathname)
OString
preprocFile
=
makeTempName
(
OString
(
"idlf_"
));
OString
preprocFile
=
makeTempName
(
OString
(
"idlf_"
));
OString
fileName
;
OString
fileName
;
if
(
pathname
==
0
)
{
if
(
pathname
==
nullptr
)
{
fileName
=
"stdin"
;
fileName
=
"stdin"
;
}
else
{
}
else
{
fileName
=
*
pathname
;
fileName
=
*
pathname
;
...
@@ -231,7 +231,7 @@ sal_Int32 compileFile(const OString * pathname)
...
@@ -231,7 +231,7 @@ sal_Int32 compileFile(const OString * pathname)
{
{
fprintf
(
stderr
,
"%s: could not copy %s%s to %s
\n
"
,
fprintf
(
stderr
,
"%s: could not copy %s%s to %s
\n
"
,
idlc
()
->
getOptions
()
->
getProgramName
().
getStr
(),
idlc
()
->
getOptions
()
->
getProgramName
().
getStr
(),
pathname
==
0
?
""
:
"file "
,
fileName
.
getStr
(),
pathname
==
nullptr
?
""
:
"file "
,
fileName
.
getStr
(),
tmpFile
.
getStr
());
tmpFile
.
getStr
());
exit
(
99
);
exit
(
99
);
}
}
...
@@ -315,11 +315,11 @@ sal_Int32 compileFile(const OString * pathname)
...
@@ -315,11 +315,11 @@ sal_Int32 compileFile(const OString * pathname)
#else // SYSTEM_UCPP
#else // SYSTEM_UCPP
cpp
=
OUString
(
UCPP
);
cpp
=
OUString
(
UCPP
);
#endif
#endif
oslProcess
hProcess
=
NULL
;
oslProcess
hProcess
=
nullptr
;
oslProcessError
procError
=
osl_Process_E_None
;
oslProcessError
procError
=
osl_Process_E_None
;
const
int
nCmdArgs
=
lCppArgs
.
size
();
const
int
nCmdArgs
=
lCppArgs
.
size
();
rtl_uString
**
pCmdArgs
=
0
;
rtl_uString
**
pCmdArgs
=
nullptr
;
pCmdArgs
=
static_cast
<
rtl_uString
**>
(
rtl_allocateZeroMemory
(
nCmdArgs
*
sizeof
(
rtl_uString
*
)));
pCmdArgs
=
static_cast
<
rtl_uString
**>
(
rtl_allocateZeroMemory
(
nCmdArgs
*
sizeof
(
rtl_uString
*
)));
::
std
::
vector
<
OUString
>::
iterator
iter
=
lCppArgs
.
begin
();
::
std
::
vector
<
OUString
>::
iterator
iter
=
lCppArgs
.
begin
();
...
@@ -331,7 +331,7 @@ sal_Int32 compileFile(const OString * pathname)
...
@@ -331,7 +331,7 @@ sal_Int32 compileFile(const OString * pathname)
}
}
procError
=
osl_executeProcess
(
cpp
.
pData
,
pCmdArgs
,
nCmdArgs
,
osl_Process_WAIT
,
procError
=
osl_executeProcess
(
cpp
.
pData
,
pCmdArgs
,
nCmdArgs
,
osl_Process_WAIT
,
0
,
startDir
.
pData
,
0
,
0
,
&
hProcess
);
nullptr
,
startDir
.
pData
,
nullptr
,
0
,
&
hProcess
);
oslProcessInfo
hInfo
;
oslProcessInfo
hInfo
;
hInfo
.
Size
=
(
sal_uInt32
)(
sizeof
(
oslProcessInfo
));
hInfo
.
Size
=
(
sal_uInt32
)(
sizeof
(
oslProcessInfo
));
...
@@ -348,7 +348,7 @@ sal_Int32 compileFile(const OString * pathname)
...
@@ -348,7 +348,7 @@ sal_Int32 compileFile(const OString * pathname)
else
else
fprintf
(
stderr
,
"%s: preprocessing %s%s failed
\n
"
,
fprintf
(
stderr
,
"%s: preprocessing %s%s failed
\n
"
,
pOptions
->
getProgramName
().
getStr
(),
pOptions
->
getProgramName
().
getStr
(),
pathname
==
0
?
""
:
"file "
,
fileName
.
getStr
());
pathname
==
nullptr
?
""
:
"file "
,
fileName
.
getStr
());
osl_freeProcessHandle
(
hProcess
);
osl_freeProcessHandle
(
hProcess
);
rtl_freeMemory
(
pCmdArgs
);
rtl_freeMemory
(
pCmdArgs
);
...
@@ -377,7 +377,7 @@ sal_Int32 compileFile(const OString * pathname)
...
@@ -377,7 +377,7 @@ sal_Int32 compileFile(const OString * pathname)
// parse file
// parse file
yyin
=
fopen
(
preprocFile
.
getStr
(),
"r"
);
yyin
=
fopen
(
preprocFile
.
getStr
(),
"r"
);
if
(
yyin
==
NULL
)
if
(
yyin
==
nullptr
)
{
{
fprintf
(
stderr
,
"%s: Could not open cpp output file %s
\n
"
,
fprintf
(
stderr
,
"%s: Could not open cpp output file %s
\n
"
,
pOptions
->
getProgramName
().
getStr
(),
preprocFile
.
getStr
());
pOptions
->
getProgramName
().
getStr
(),
preprocFile
.
getStr
());
...
...
idlc/source/idlcmain.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -47,7 +47,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
...
@@ -47,7 +47,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fprintf
(
fprintf
(
stdout
,
"%s: Compiling stdin
\n
"
,
stdout
,
"%s: Compiling stdin
\n
"
,
options
.
getProgramName
().
getStr
());
options
.
getProgramName
().
getStr
());
nErrors
=
compileFile
(
0
);
nErrors
=
compileFile
(
nullptr
);
if
(
(
idlc
()
->
getWarningCount
()
>
0
)
&&
!
options
.
quiet
()
)
{
if
(
(
idlc
()
->
getWarningCount
()
>
0
)
&&
!
options
.
quiet
()
)
{
fprintf
(
fprintf
(
stdout
,
"%s: detected %lu warnings compiling stdin
\n
"
,
stdout
,
"%s: detected %lu warnings compiling stdin
\n
"
,
...
@@ -68,7 +68,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
...
@@ -68,7 +68,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if
(
nErrors
>
0
)
{
if
(
nErrors
>
0
)
{
removeIfExists
(
outputUrl
);
removeIfExists
(
outputUrl
);
}
else
{
}
else
{
nErrors
=
produceFile
(
outputUrl
,
0
);
nErrors
=
produceFile
(
outputUrl
,
nullptr
);
}
}
idlc
()
->
reset
();
idlc
()
->
reset
();
}
}
...
@@ -132,7 +132,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
...
@@ -132,7 +132,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
}
else
{
}
else
{
sPair_t
const
pair
(
depFileUrl
,
outputFile
);
sPair_t
const
pair
(
depFileUrl
,
outputFile
);
nErrors
=
produceFile
(
outputFileUrl
,
nErrors
=
produceFile
(
outputFileUrl
,
(
options
.
isValid
(
"-M"
))
?
&
pair
:
0
);
(
options
.
isValid
(
"-M"
))
?
&
pair
:
nullptr
);
}
}
idlc
()
->
reset
();
idlc
()
->
reset
();
...
...
idlc/source/idlcproduce.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
using
namespace
::
osl
;
using
namespace
::
osl
;
StringList
*
pCreatedDirectories
=
NULL
;
StringList
*
pCreatedDirectories
=
nullptr
;
static
bool
checkOutputPath
(
const
OString
&
completeName
)
static
bool
checkOutputPath
(
const
OString
&
completeName
)
{
{
...
...
idlc/source/options.cxx
Dosyayı görüntüle @
a96b564a
...
@@ -62,7 +62,7 @@ Options::~Options()
...
@@ -62,7 +62,7 @@ Options::~Options()
// static
// static
bool
Options
::
checkArgument
(
std
::
vector
<
std
::
string
>
&
rArgs
,
char
const
*
arg
,
size_t
len
)
bool
Options
::
checkArgument
(
std
::
vector
<
std
::
string
>
&
rArgs
,
char
const
*
arg
,
size_t
len
)
{
{
bool
result
=
((
arg
!=
0
)
&&
(
len
>
0
));
bool
result
=
((
arg
!=
nullptr
)
&&
(
len
>
0
));
OSL_PRECOND
(
result
,
"idlc::Options::checkArgument(): invalid arguments"
);
OSL_PRECOND
(
result
,
"idlc::Options::checkArgument(): invalid arguments"
);
if
(
result
)
if
(
result
)
{
{
...
@@ -117,7 +117,7 @@ bool Options::checkArgument (std::vector< std::string > & rArgs, char const * ar
...
@@ -117,7 +117,7 @@ bool Options::checkArgument (std::vector< std::string > & rArgs, char const * ar
bool
Options
::
checkCommandFile
(
std
::
vector
<
std
::
string
>
&
rArgs
,
char
const
*
filename
)
bool
Options
::
checkCommandFile
(
std
::
vector
<
std
::
string
>
&
rArgs
,
char
const
*
filename
)
{
{
FILE
*
fp
=
fopen
(
filename
,
"r"
);
FILE
*
fp
=
fopen
(
filename
,
"r"
);
if
(
fp
==
0
)
if
(
fp
==
nullptr
)
{
{
fprintf
(
stderr
,
"ERROR: can't open command file
\"
%s
\"\n
"
,
filename
);
fprintf
(
stderr
,
"ERROR: can't open command file
\"
%s
\"\n
"
,
filename
);
return
false
;
return
false
;
...
@@ -175,7 +175,7 @@ bool Options::checkCommandFile (std::vector< std::string > & rArgs, char const *
...
@@ -175,7 +175,7 @@ bool Options::checkCommandFile (std::vector< std::string > & rArgs, char const *
bool
Options
::
badOption
(
char
const
*
reason
,
std
::
string
const
&
rArg
)
throw
(
IllegalArgument
)
bool
Options
::
badOption
(
char
const
*
reason
,
std
::
string
const
&
rArg
)
throw
(
IllegalArgument
)
{
{
OStringBuffer
message
;
OStringBuffer
message
;
if
(
reason
!=
0
)
if
(
reason
!=
nullptr
)
{
{
message
.
append
(
reason
);
message
.
append
(
" option '"
);
message
.
append
(
rArg
.
c_str
());
message
.
append
(
"'"
);
message
.
append
(
reason
);
message
.
append
(
" option '"
);
message
.
append
(
rArg
.
c_str
());
message
.
append
(
"'"
);
throw
IllegalArgument
(
message
.
makeStringAndClear
());
throw
IllegalArgument
(
message
.
makeStringAndClear
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment