summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-07-18 13:14:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-18 13:14:49 -0700
commit34965459f4f53a77f6c925292304eface57d12c6 (patch)
tree788cb62af316f8b5c5d520583eaa0313dd48144e /xfa/fxfa/parser
parentaae4566ee8b2eaffb182861047c466ed1ec04902 (diff)
downloadpdfium-34965459f4f53a77f6c925292304eface57d12c6.tar.xz
Cleanup fgas/crt.
This CL removes unused methods and default parameters from the fgas/crt code. Review-Url: https://codereview.chromium.org/2162503003
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_xml_parser.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_basic_imp.cpp3
-rw-r--r--xfa/fxfa/parser/xfa_basic_imp.h3
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_utils.h12
5 files changed, 10 insertions, 12 deletions
diff --git a/xfa/fxfa/parser/cxfa_xml_parser.cpp b/xfa/fxfa/parser/cxfa_xml_parser.cpp
index 268c8b1416..654a449a88 100644
--- a/xfa/fxfa/parser/cxfa_xml_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_xml_parser.cpp
@@ -23,7 +23,7 @@ CXFA_XMLParser::CXFA_XMLParser(CFDE_XMLNode* pRoot, IFX_Stream* pStream)
}
CXFA_XMLParser::~CXFA_XMLParser() {
- m_NodeStack.RemoveAll();
+ m_NodeStack.RemoveAll(FALSE);
m_ws1.clear();
m_ws2.clear();
}
diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp
index f236d0e8a3..4d3b128bdb 100644
--- a/xfa/fxfa/parser/xfa_basic_imp.cpp
+++ b/xfa/fxfa/parser/xfa_basic_imp.cpp
@@ -544,8 +544,7 @@ int32_t CXFA_WideTextRead::ReadData(uint8_t* pBuffer, int32_t iBufferSize) {
}
int32_t CXFA_WideTextRead::ReadString(FX_WCHAR* pStr,
int32_t iMaxLength,
- FX_BOOL& bEOS,
- int32_t const* pByteSize) {
+ FX_BOOL& bEOS) {
iMaxLength = std::min(iMaxLength, m_wsBuffer.GetLength() - m_iPosition);
if (iMaxLength == 0)
return 0;
diff --git a/xfa/fxfa/parser/xfa_basic_imp.h b/xfa/fxfa/parser/xfa_basic_imp.h
index 3badbb463e..8ca153b90f 100644
--- a/xfa/fxfa/parser/xfa_basic_imp.h
+++ b/xfa/fxfa/parser/xfa_basic_imp.h
@@ -36,8 +36,7 @@ class CXFA_WideTextRead : public IFX_Stream {
int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) override;
int32_t ReadString(FX_WCHAR* pStr,
int32_t iMaxLength,
- FX_BOOL& bEOS,
- int32_t const* pByteSize = nullptr) override;
+ FX_BOOL& bEOS) override;
int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) override;
int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) override;
void Flush() override {}
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index a9a5b29458..de2f804a4c 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -3625,7 +3625,7 @@ FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
case XFA_ATTRIBUTETYPE_Integer:
return SetInteger(
pAttr->eName,
- FXSYS_round(FX_wcstof(wsValue.c_str(), wsValue.GetLength())),
+ FXSYS_round(FX_wcstof(wsValue.c_str(), wsValue.GetLength(), nullptr)),
bNotify);
case XFA_ATTRIBUTETYPE_Measure:
return SetMeasure(pAttr->eName, CXFA_Measurement(wsValue), bNotify);
diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h
index 0aa9064288..794624a8de 100644
--- a/xfa/fxfa/parser/xfa_utils.h
+++ b/xfa/fxfa/parser/xfa_utils.h
@@ -27,7 +27,7 @@ template <class NodeType, class TraverseStrategy>
class CXFA_NodeIteratorTemplate {
public:
CXFA_NodeIteratorTemplate(NodeType* pRootNode = nullptr)
- : m_pRoot(pRootNode) {
+ : m_pRoot(pRootNode), m_NodeStack(100) {
if (pRootNode) {
m_NodeStack.Push(pRootNode);
}
@@ -37,11 +37,11 @@ class CXFA_NodeIteratorTemplate {
return FALSE;
}
m_pRoot = pRootNode;
- m_NodeStack.RemoveAll();
+ m_NodeStack.RemoveAll(FALSE);
m_NodeStack.Push(pRootNode);
return TRUE;
}
- void Clear() { m_NodeStack.RemoveAll(); }
+ void Clear() { m_NodeStack.RemoveAll(FALSE); }
void Reset() {
Clear();
if (m_pRoot) {
@@ -49,9 +49,9 @@ class CXFA_NodeIteratorTemplate {
}
}
FX_BOOL SetCurrent(NodeType* pCurNode) {
- m_NodeStack.RemoveAll();
+ m_NodeStack.RemoveAll(FALSE);
if (pCurNode) {
- CFX_StackTemplate<NodeType*> revStack;
+ CFX_StackTemplate<NodeType*> revStack(100);
NodeType* pNode;
for (pNode = pCurNode; pNode && pNode != m_pRoot;
pNode = TraverseStrategy::GetParent(pNode)) {
@@ -94,7 +94,7 @@ class CXFA_NodeIteratorTemplate {
}
m_NodeStack.Push(pPrevItem);
} else {
- m_NodeStack.RemoveAll();
+ m_NodeStack.RemoveAll(FALSE);
if (m_pRoot) {
m_NodeStack.Push(m_pRoot);
}