Update CefRange type to match gfx::Range (fixes #3422)

This commit is contained in:
Vladimir Kharitonov
2023-05-16 13:22:17 +03:00
committed by Marshall Greenblatt
parent e5334a5a18
commit ecdfd467f8
9 changed files with 74 additions and 67 deletions

View File

@ -3000,8 +3000,8 @@ typedef enum {
/// Structure representing a range.
///
typedef struct _cef_range_t {
int from;
int to;
uint32_t from;
uint32_t to;
} cef_range_t;
///

View File

@ -215,7 +215,12 @@ class CefRange : public cef_range_t {
public:
CefRange() : cef_range_t{} {}
CefRange(const cef_range_t& r) : cef_range_t(r) {}
CefRange(int from, int to) : cef_range_t{from, to} {}
CefRange(uint32_t from, uint32_t to) : cef_range_t{from, to} {}
static CefRange InvalidRange() {
return CefRange(std::numeric_limits<uint32_t>::max(),
std::numeric_limits<uint32_t>::max());
}
void Set(int from_val, int to_val) { from = from_val, to = to_val; }
};