Change index parameter type from int to size_t (issue #1491)

This commit is contained in:
Marshall Greenblatt
2016-11-04 14:38:59 -04:00
parent f3a0ff98bb
commit cdd2a40469
19 changed files with 272 additions and 433 deletions

View File

@ -606,14 +606,14 @@ class CefListValue : public virtual CefBase {
///
// Removes the value at the specified index.
///
/*--cef(index_param=index)--*/
virtual bool Remove(int index) =0;
/*--cef()--*/
virtual bool Remove(size_t index) =0;
///
// Returns the value type at the specified index.
///
/*--cef(default_retval=VTYPE_INVALID,index_param=index)--*/
virtual CefValueType GetType(int index) =0;
/*--cef(default_retval=VTYPE_INVALID)--*/
virtual CefValueType GetType(size_t index) =0;
///
// Returns the value at the specified index. For simple types the returned
@ -622,55 +622,55 @@ class CefListValue : public virtual CefBase {
// returned value will reference existing data and modifications to the value
// will modify this object.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefValue> GetValue(int index) =0;
/*--cef()--*/
virtual CefRefPtr<CefValue> GetValue(size_t index) =0;
///
// Returns the value at the specified index as type bool.
///
/*--cef(index_param=index)--*/
virtual bool GetBool(int index) =0;
/*--cef()--*/
virtual bool GetBool(size_t index) =0;
///
// Returns the value at the specified index as type int.
///
/*--cef(index_param=index)--*/
virtual int GetInt(int index) =0;
/*--cef()--*/
virtual int GetInt(size_t index) =0;
///
// Returns the value at the specified index as type double.
///
/*--cef(index_param=index)--*/
virtual double GetDouble(int index) =0;
/*--cef()--*/
virtual double GetDouble(size_t index) =0;
///
// Returns the value at the specified index as type string.
///
/*--cef(index_param=index)--*/
virtual CefString GetString(int index) =0;
/*--cef()--*/
virtual CefString GetString(size_t index) =0;
///
// Returns the value at the specified index as type binary. The returned
// value will reference existing data.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefBinaryValue> GetBinary(int index) =0;
/*--cef()--*/
virtual CefRefPtr<CefBinaryValue> GetBinary(size_t index) =0;
///
// Returns the value at the specified index as type dictionary. The returned
// value will reference existing data and modifications to the value will
// modify this object.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefDictionaryValue> GetDictionary(int index) =0;
/*--cef()--*/
virtual CefRefPtr<CefDictionaryValue> GetDictionary(size_t index) =0;
///
// Returns the value at the specified index as type list. The returned
// value will reference existing data and modifications to the value will
// modify this object.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefListValue> GetList(int index) =0;
/*--cef()--*/
virtual CefRefPtr<CefListValue> GetList(size_t index) =0;
///
// Sets the value at the specified index. Returns true if the value was set
@ -680,43 +680,43 @@ class CefListValue : public virtual CefBase {
// underlying data will be referenced and modifications to |value| will modify
// this object.
///
/*--cef(index_param=index)--*/
virtual bool SetValue(int index, CefRefPtr<CefValue> value) =0;
/*--cef()--*/
virtual bool SetValue(size_t index, CefRefPtr<CefValue> value) =0;
///
// Sets the value at the specified index as type null. Returns true if the
// value was set successfully.
///
/*--cef(index_param=index)--*/
virtual bool SetNull(int index) =0;
/*--cef()--*/
virtual bool SetNull(size_t index) =0;
///
// Sets the value at the specified index as type bool. Returns true if the
// value was set successfully.
///
/*--cef(index_param=index)--*/
virtual bool SetBool(int index, bool value) =0;
/*--cef()--*/
virtual bool SetBool(size_t index, bool value) =0;
///
// Sets the value at the specified index as type int. Returns true if the
// value was set successfully.
///
/*--cef(index_param=index)--*/
virtual bool SetInt(int index, int value) =0;
/*--cef()--*/
virtual bool SetInt(size_t index, int value) =0;
///
// Sets the value at the specified index as type double. Returns true if the
// value was set successfully.
///
/*--cef(index_param=index)--*/
virtual bool SetDouble(int index, double value) =0;
/*--cef()--*/
virtual bool SetDouble(size_t index, double value) =0;
///
// Sets the value at the specified index as type string. Returns true if the
// value was set successfully.
///
/*--cef(optional_param=value,index_param=index)--*/
virtual bool SetString(int index, const CefString& value) =0;
/*--cef(optional_param=value)--*/
virtual bool SetString(size_t index, const CefString& value) =0;
///
// Sets the value at the specified index as type binary. Returns true if the
@ -725,8 +725,8 @@ class CefListValue : public virtual CefBase {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
/*--cef(index_param=index)--*/
virtual bool SetBinary(int index, CefRefPtr<CefBinaryValue> value) =0;
/*--cef()--*/
virtual bool SetBinary(size_t index, CefRefPtr<CefBinaryValue> value) =0;
///
// Sets the value at the specified index as type dict. Returns true if the
@ -735,8 +735,8 @@ class CefListValue : public virtual CefBase {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
/*--cef(index_param=index)--*/
virtual bool SetDictionary(int index, CefRefPtr<CefDictionaryValue> value) =0;
/*--cef()--*/
virtual bool SetDictionary(size_t index, CefRefPtr<CefDictionaryValue> value) =0;
///
// Sets the value at the specified index as type list. Returns true if the
@ -745,8 +745,8 @@ class CefListValue : public virtual CefBase {
// Otherwise, ownership will be transferred to this object and the |value|
// reference will be invalidated.
///
/*--cef(index_param=index)--*/
virtual bool SetList(int index, CefRefPtr<CefListValue> value) =0;
/*--cef()--*/
virtual bool SetList(size_t index, CefRefPtr<CefListValue> value) =0;
};
#endif // CEF_INCLUDE_CEF_VALUES_H_