summaryrefslogtreecommitdiffstats
path: root/src/server/UndoStack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/UndoStack.cpp')
-rw-r--r--src/server/UndoStack.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/server/UndoStack.cpp b/src/server/UndoStack.cpp
index 395a04cd..c6555123 100644
--- a/src/server/UndoStack.cpp
+++ b/src/server/UndoStack.cpp
@@ -16,18 +16,17 @@
#include "UndoStack.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/ingen.h"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/patch/patch.h"
-#include "serd/serd.h"
-#include "sratom/sratom.h"
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/ingen.h>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/patch/patch.h>
+#include <serd/serd.h>
+#include <sratom/sratom.h>
#include <ctime>
#include <iterator>
-#include <memory>
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -41,7 +40,7 @@ UndoStack::start_entry()
if (_depth == 0) {
time_t now = {};
time(&now);
- _stack.emplace_back(Entry(now));
+ _stack.emplace_back(now);
}
return ++_depth;
}
@@ -188,8 +187,8 @@ UndoStack::write_entry(Sratom* sratom,
strftime(time_str, sizeof(time_str), "%FT%T", gmtime(&entry.time));
// entry rdf:type ingen:UndoEntry
- SerdNode p = serd_node_from_string(SERD_URI, USTR(INGEN_NS "time"));
- SerdNode o = serd_node_from_string(SERD_LITERAL, USTR(time_str));
+ SerdNode p = serd_node_from_string(SERD_URI, USTR(INGEN_NS "time"));
+ const SerdNode o = serd_node_from_string(SERD_LITERAL, USTR(time_str));
serd_writer_write_statement(writer, SERD_ANON_CONT, nullptr, subject, &p, &o, nullptr, nullptr);
p = serd_node_from_string(SERD_URI, USTR(INGEN_NS "events"));
@@ -245,8 +244,8 @@ UndoStack::save(FILE* stream, const char* name)
reinterpret_cast<SerdEndSink>(serd_writer_end_anon),
writer);
- SerdNode s = serd_node_from_string(SERD_BLANK, USTR(name));
- SerdNode p = serd_node_from_string(SERD_URI, USTR(INGEN_NS "entries"));
+ const SerdNode s = serd_node_from_string(SERD_BLANK, USTR(name));
+ const SerdNode p = serd_node_from_string(SERD_URI, USTR(INGEN_NS "entries"));
BlankIDs ids('u');
ListContext ctx(ids, 0, &s, &p);