mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 760845 - Remove NS_IMPL_POSITIVE_INT_ATTR{,_DEFAULT_VALUE} macros. r=Ms2ger
They are no longer used and doesn't match anything in the specifications now.
This commit is contained in:
parent
7d616322e4
commit
5d2063dd4a
@ -1161,31 +1161,6 @@ PR_STATIC_ASSERT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 1 < 32);
|
||||
return SetAttrHelper(nsGkAtoms::_atom, aValue); \
|
||||
}
|
||||
|
||||
/**
|
||||
* A macro to implement the getter and setter for a given content
|
||||
* property that needs to set a positive integer. The method uses
|
||||
* the generic GetAttr and SetAttr methods. This macro is much like
|
||||
* the NS_IMPL_NON_NEGATIVE_INT_ATTR macro except the exception is
|
||||
* thrown also when the value is equal to 0.
|
||||
*/
|
||||
#define NS_IMPL_POSITIVE_INT_ATTR(_class, _method, _atom) \
|
||||
NS_IMPL_POSITIVE_INT_ATTR_DEFAULT_VALUE(_class, _method, _atom, 1)
|
||||
|
||||
#define NS_IMPL_POSITIVE_INT_ATTR_DEFAULT_VALUE(_class, _method, _atom, _default) \
|
||||
NS_IMETHODIMP \
|
||||
_class::Get##_method(PRInt32* aValue) \
|
||||
{ \
|
||||
return GetIntAttr(nsGkAtoms::_atom, _default, aValue); \
|
||||
} \
|
||||
NS_IMETHODIMP \
|
||||
_class::Set##_method(PRInt32 aValue) \
|
||||
{ \
|
||||
if (aValue <= 0) { \
|
||||
return NS_ERROR_DOM_INDEX_SIZE_ERR; \
|
||||
} \
|
||||
return SetIntAttr(nsGkAtoms::_atom, aValue); \
|
||||
}
|
||||
|
||||
/**
|
||||
* QueryInterface() implementation helper macros
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user