forked from lix-project/hydra
Remove finally.hh
This commit is contained in:
parent
386a972244
commit
dd5af7637d
|
@ -2,8 +2,7 @@ bin_PROGRAMS = hydra-queue-runner
|
||||||
|
|
||||||
hydra_queue_runner_SOURCES = hydra-queue-runner.cc queue-monitor.cc dispatcher.cc \
|
hydra_queue_runner_SOURCES = hydra-queue-runner.cc queue-monitor.cc dispatcher.cc \
|
||||||
builder.cc build-result.cc build-remote.cc \
|
builder.cc build-result.cc build-remote.cc \
|
||||||
build-result.hh counter.hh token-server.hh state.hh db.hh \
|
build-result.hh counter.hh token-server.hh state.hh db.hh
|
||||||
finally.hh
|
|
||||||
hydra_queue_runner_LDADD = $(NIX_LIBS) -lpqxx
|
hydra_queue_runner_LDADD = $(NIX_LIBS) -lpqxx
|
||||||
|
|
||||||
AM_CXXFLAGS = $(NIX_CFLAGS) -Wall -laws-cpp-sdk-s3
|
AM_CXXFLAGS = $(NIX_CFLAGS) -Wall -laws-cpp-sdk-s3
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/* A trivial class to run a function at the end of a scope. */
|
|
||||||
class Finally
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
std::function<void()> fun;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Finally(std::function<void()> fun) : fun(fun) { }
|
|
||||||
~Finally() { fun(); }
|
|
||||||
};
|
|
Loading…
Reference in a new issue