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

#include "../wrapper/diffstats_wrapper.hpp"

#include "../utils/git_exception.hpp"

diffstats_wrapper::diffstats_wrapper(git_diff_stats* stats)
    : base_type(stats)
{
}

diffstats_wrapper::~diffstats_wrapper()
{
    git_diff_stats_free(p_resource);
    p_resource = nullptr;
}

git_buf diffstats_wrapper::to_buf(git_diff_stats_format_t format, size_t width)
{
    git_buf buf = GIT_BUF_INIT;
    throw_if_error(git_diff_stats_to_buf(&buf, *this, format, 80));
    return buf;
}

Web Proxy Viewer  |  New URL  |  Original Page