mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
compare_to
This commit is contained in:
parent
253a084e7b
commit
414eaf3930
@ -30,18 +30,27 @@ compare_to(const DocumentSpec &other) const {
|
|||||||
if (_flags != other._flags) {
|
if (_flags != other._flags) {
|
||||||
return (_flags - other._flags);
|
return (_flags - other._flags);
|
||||||
}
|
}
|
||||||
if (_request_mode != other._request_mode) {
|
|
||||||
return (int)_request_mode - (int)other._request_mode;
|
|
||||||
}
|
|
||||||
int c = _url.compare_to(other._url);
|
int c = _url.compare_to(other._url);
|
||||||
if (c != 0) {
|
if (c != 0) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
c = _tag.compare_to(other._tag);
|
if (has_tag()) {
|
||||||
if (c != 0) {
|
c = _tag.compare_to(other._tag);
|
||||||
return c;
|
if (c != 0) {
|
||||||
|
return c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return _date.compare_to(other._date);
|
if (has_date()) {
|
||||||
|
c = _date.compare_to(other._date);
|
||||||
|
if (c != 0) {
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't consider _request_mode or _cache_control significant in
|
||||||
|
// the comparison.
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user