From 5ce317bb486d8bd84ffbec5003fa56fbb066de86 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 7 Sep 2014 22:56:28 -0400 Subject: [PATCH] Hooks - Modified ::onExit to remove the indicator that data was modified. This is not supported. --- src/Context.cpp | 3 +-- src/Hooks.cpp | 6 +----- src/Hooks.h | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index ab6e6707b..9f3f9f31c 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -284,8 +284,7 @@ int Context::run () try { rc = dispatch (output); - if (hooks.onExit ()) - tdb2.commit (); + hooks.onExit (); std::stringstream s; s << "Perf " diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 980355dbc..bea5c3ae0 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -136,13 +136,10 @@ void Hooks::onLaunch () // Exit: // 0 Means: - all emitted non-JSON lines become footnote entries // non-0 Means: - all emitted non-JSON lines become error entries -bool Hooks::onExit () +void Hooks::onExit () { context.timer_hooks.start (); - // Status indicates whether hooks resulted in new/modified tasks. - bool status = false; - std::vector matchingScripts = scripts ("on-exit"); std::vector ::iterator i; for (i = matchingScripts.begin (); i != matchingScripts.end (); ++i) @@ -169,7 +166,6 @@ bool Hooks::onExit () } context.timer_hooks.stop (); - return status; } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/Hooks.h b/src/Hooks.h index f646de123..0af7e9bed 100644 --- a/src/Hooks.h +++ b/src/Hooks.h @@ -41,7 +41,7 @@ public: void initialize (); void onLaunch (); - bool onExit (); + void onExit (); void onAdd (Task&); void onModify (const Task&, Task&);