Skip to content
  • Vlad Zahorodnii's avatar
    Introduce resource_cast<> helper function · 9c944c81
    Vlad Zahorodnii authored
    Getting the object associated with the particular wl_resource is not
    difficult, but it involves a pretty reasonable amount of boilerplate
    code.
    
    This change, introduces a helper function with an intend to reduce the
    amount of boilerplate code.
    
    It can be used as resource_cast<const ObjectPrivate *>(resource) or
    just simply resource_cast<ObjectPrivate *>(resource).
    9c944c81