File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ class ustring16 {
449449 // ! Returns the length of a ustring16 in full characters.
450450 // ! \return Length of a ustring16 in full characters.
451451 u32 size () const {
452- if (sizeof (wchar_t ) == 4 ) {
452+ if constexpr (sizeof (wchar_t ) == 4 ) {
453453 return size_raw_;
454454 } else {
455455 if (size_ != 0xffffffff )
@@ -524,7 +524,7 @@ class ustring16 {
524524 // ! \return A reference to our current string.
525525 void validate () {
526526 // Validate all unicode characters.
527- if (sizeof (wchar_t ) == 4 ) {
527+ if constexpr (sizeof (wchar_t ) == 4 ) {
528528 size_ = size_raw_;
529529 return ;
530530 }
Original file line number Diff line number Diff line change 1010#include < event2/thread.h>
1111#include < type_traits>
1212
13- #define check_trivially_copyable (T ) static_assert (std::is_trivially_copyable <T>::value == true && std::is_standard_layout <T>::value == true , " not trivially copyable" )
13+ #define check_trivially_copyable (T ) static_assert (std::is_trivially_copyable_v <T> == true && std::is_standard_layout_v <T> == true , " not trivially copyable" )
1414
1515namespace ygo {
1616 constexpr int SIZE_NETWORK_BUFFER = 0x20000 ;
You can’t perform that action at this time.
0 commit comments