mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8308396: Fix offset_of conversion warnings in runtime code
Reviewed-by: amitkumar, jsjolen, fparain
This commit is contained in:
parent
a5343fa605
commit
265f40b4f7
85 changed files with 438 additions and 436 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -54,6 +54,9 @@ constexpr ByteSize operator + (ByteSize x, ByteSize y) { return in_ByteSize(in_b
|
|||
constexpr ByteSize operator - (ByteSize x, ByteSize y) { return in_ByteSize(in_bytes(x) - in_bytes(y)); }
|
||||
constexpr ByteSize operator * (ByteSize x, int y) { return in_ByteSize(in_bytes(x) * y ); }
|
||||
|
||||
constexpr bool operator == (ByteSize x, int y) { return in_bytes(x) == y; }
|
||||
constexpr bool operator != (ByteSize x, int y) { return in_bytes(x) != y; }
|
||||
|
||||
// Use the following #define to get C++ field member offsets
|
||||
|
||||
#define byte_offset_of(klass,field) in_ByteSize((int)offset_of(klass, field))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue