Skip to content

Commit

Permalink
Fix static_size declaration
Browse files Browse the repository at this point in the history
I have a vague memory that it was intentionally written
that way, but I can't recall :-(.
  • Loading branch information
behdad committed Aug 22, 2023
1 parent 2023384 commit 56e8a29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/OT/Color/COLR/COLR.hh
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ struct Variable
public:
VarIdx varIdxBase;
public:
DEFINE_SIZE_STATIC (4 + T::static_size);
DEFINE_SIZE_MIN (VarIdx::static_size + T::min_size);
};

template <typename T>
Expand Down Expand Up @@ -337,7 +337,7 @@ struct NoVariable

T value;
public:
DEFINE_SIZE_STATIC (T::static_size);
DEFINE_SIZE_MIN (T::min_size);
};

// Color structures
Expand Down
2 changes: 1 addition & 1 deletion src/hb-null.hh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ using hb_null_size = _hb_null_size<T, void>;
template <typename T, typename>
struct _hb_static_size : hb_integral_constant<unsigned, sizeof (T)> {};
template <typename T>
struct _hb_static_size<T, hb_void_t<decltype (T::min_size)>> : hb_integral_constant<unsigned, T::static_size> {};
struct _hb_static_size<T, hb_void_t<decltype (T::static_size)>> : hb_integral_constant<unsigned, T::static_size> {};
template <typename T>
using hb_static_size = _hb_static_size<T, void>;
#define hb_static_size(T) hb_static_size<T>::value
Expand Down

0 comments on commit 56e8a29

Please sign in to comment.