summaryrefslogtreecommitdiff
path: root/src/context.cc
blob: 8dcbdbbdb82f4436ef8711288002b630eaa1ebb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "context.h"

namespace Mauri
{

static Context *context_ = nullptr;

auto context() -> Context *
{
    return context_;
}

auto set_context(Context *c) -> void
{
    if (context_) delete context_;
    context_ = c;
}

} // namespace Mauri