[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/QuantStack/git2cpp/0.0.12/src/wrapper/object_wrapper.cpp [Back]  [Original]

#include "../wrapper/object_wrapper.hpp"

object_wrapper::object_wrapper(git_object* obj)
    : base_type(obj)
{
}

object_wrapper::~object_wrapper()
{
    git_object_free(p_resource);
    p_resource = nullptr;
}

const git_oid& object_wrapper::oid() const
{
    return *git_object_id(*this);
}

object_wrapper::operator git_commit*() const noexcept
{
    return reinterpret_cast(p_resource);
}

object_wrapper::operator git_tag*() const noexcept
{
    return reinterpret_cast(p_resource);
}

Web Proxy Viewer  |  New URL  |  Original Page