Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolse committed Dec 11, 2023
1 parent e867624 commit 1cf1fb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions node/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,7 @@ class NodeProcessor
Type m_Value;
bool operator < (const Key& x) const { return m_Value < x.m_Value; }
IMPLEMENT_GET_PARENT_OBJ(Entry, m_Key)
};
Key m_Key;
} m_Key;

struct Mru
:public boost::intrusive::list_base_hook<>
Expand Down
2 changes: 1 addition & 1 deletion utility/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

#define IMPLEMENT_GET_PARENT_OBJ(parent_class, this_var) \
parent_class& get_ParentObj() const { \
parent_class* p = (parent_class*) (((uint8_t*) this) + 1 - (uint8_t*) (&((parent_class*) 1)->this_var)); \
parent_class* p = (parent_class*) (((uint8_t*) this) - offsetof(parent_class, this_var)); \
assert(this == &p->this_var); /* this also tests that the variable of the correct type */ \
return *p; \
}
Expand Down

0 comments on commit 1cf1fb2

Please sign in to comment.