- Revert: Change index parameter types from int to size_t to make 0-based range implicit.

- Add checks that index values are >= 0.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@409 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-12-08 10:22:15 +00:00
parent 64e08c2918
commit ef64033467
15 changed files with 137 additions and 51 deletions

View File

@@ -315,13 +315,18 @@ size_t CefXmlReaderCToCpp::GetAttributeCount()
}
CefString CefXmlReaderCToCpp::GetAttribute(size_t index)
CefString CefXmlReaderCToCpp::GetAttribute(int index)
{
if (CEF_MEMBER_MISSING(struct_, get_attribute_byindex))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return CefString();
// Execute
cef_string_userfree_t _retval = struct_->get_attribute_byindex(struct_,
index);
@@ -434,13 +439,18 @@ int CefXmlReaderCToCpp::GetLineNumber()
}
bool CefXmlReaderCToCpp::MoveToAttribute(size_t index)
bool CefXmlReaderCToCpp::MoveToAttribute(int index)
{
if (CEF_MEMBER_MISSING(struct_, move_to_attribute_byindex))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return false;
// Execute
int _retval = struct_->move_to_attribute_byindex(struct_,
index);