From 1e6eda19b5ccb314d7443ac089ebb5752203d969 Mon Sep 17 00:00:00 2001 From: jez_higgins <> Date: Mon, 28 Apr 2003 14:51:48 +0000 Subject: [PATCH] added some explicit casts from size_t to unsigned ints --- SAX/wrappers/saxmsxml2.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/SAX/wrappers/saxmsxml2.h b/SAX/wrappers/saxmsxml2.h index 27365502..eae0b2de 100644 --- a/SAX/wrappers/saxmsxml2.h +++ b/SAX/wrappers/saxmsxml2.h @@ -308,9 +308,9 @@ class msxml2_wrapper : public SAX::basic_XMLReader if(contentHandler_) { AttributesAdaptor attrs(pAttributes); - contentHandler_->startElement(SA_.makeStringT(pwchNamespaceUri, cchNamespaceUri), - SA_.makeStringT(pwchLocalName, cchLocalName), - SA_.makeStringT(pwchQName, cchQName), + contentHandler_->startElement(SA_.makeStringT(pwchNamespaceUri, cchNamespaceUri), + SA_.makeStringT(pwchLocalName, cchLocalName), + SA_.makeStringT(pwchQName, cchQName), attrs); } // if ... return S_OK; @@ -325,8 +325,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader /* [in] */ int cchQName) { if(contentHandler_) - contentHandler_->endElement(SA_.makeStringT(pwchNamespaceUri, cchNamespaceUri), - SA_.makeStringT(pwchLocalName, cchLocalName), + contentHandler_->endElement(SA_.makeStringT(pwchNamespaceUri, cchNamespaceUri), + SA_.makeStringT(pwchLocalName, cchLocalName), SA_.makeStringT(pwchQName, cchQName)); return S_OK; } // endElement @@ -460,8 +460,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader int index = -1; std::wstring wUri(SA_.asStdWString(uri)); std::wstring wLocalName(SA_.asStdWString(localName)); - HRESULT hr = attributes_->getIndexFromName(const_cast(wUri.data()), wUri.length(), - const_cast(wLocalName.data()), wLocalName.length(), + HRESULT hr = attributes_->getIndexFromName(const_cast(wUri.data()), static_cast(wUri.length()), + const_cast(wLocalName.data()), static_cast(wLocalName.length()), &index); return index; } // getIndex @@ -470,7 +470,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader { int index = -1; std::wstring wQName(SA_.asStdWString(qName)); - attributes_->getIndexFromQName(const_cast(wQName.data()), wQName.length(), &index); + attributes_->getIndexFromQName(const_cast(wQName.data()), static_cast(wQName.length()), &index); return index; } // getIndex @@ -480,8 +480,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader int cchType; std::wstring wUri(SA_.asStdWString(uri)); std::wstring wLocalName(SA_.asStdWString(localName)); - HRESULT hr = attributes_->getTypeFromName(const_cast(wUri.data()), wUri.length(), - const_cast(wLocalName.data()), wLocalName.length(), + HRESULT hr = attributes_->getTypeFromName(const_cast(wUri.data()), static_cast(wUri.length()), + const_cast(wLocalName.data()), static_cast(wLocalName.length()), &pwchType, &cchType); if (FAILED(hr)) return stringT(); @@ -494,7 +494,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader const wchar_t* pwchType; int cchType; std::wstring wQName(SA_.asStdWString(qName)); - HRESULT hr = attributes_->getTypeFromQName(const_cast(wQName.data()), wQName.length(), + HRESULT hr = attributes_->getTypeFromQName(const_cast(wQName.data()), static_cast(wQName.length()), &pwchType, &cchType); if (FAILED(hr)) return stringT(); @@ -508,8 +508,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader int cchValue; std::wstring wUri(SA_.asStdWString(uri)); std::wstring wLocalName(SA_.asStdWString(localName)); - HRESULT hr = attributes_->getValueFromName(const_cast(wUri.data()), wUri.length(), - const_cast(wLocalName.data()), wLocalName.length(), + HRESULT hr = attributes_->getValueFromName(const_cast(wUri.data()), static_cast(wUri.length()), + const_cast(wLocalName.data()), static_cast(wLocalName.length()), &pwchValue, &cchValue); if (FAILED(hr)) return stringT(); @@ -522,7 +522,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader const wchar_t* pwchValue; int cchValue; std::wstring wQName(SA_.asStdWString(qname)); - HRESULT hr = attributes_->getValueFromQName(const_cast(wQName.data()), wQName.length(), + HRESULT hr = attributes_->getValueFromQName(const_cast(wQName.data()), static_cast(wQName.length()), &pwchValue, &cchValue); if (FAILED(hr)) return stringT(); @@ -952,3 +952,4 @@ void msxml2_wrapper::parse(SAX::basic #endif // end of file +