diff options
| -rw-r--r-- | server/src/journal_commit.cc | 30 | ||||
| -rw-r--r-- | server/src/journal_commit.h | 6 | 
2 files changed, 8 insertions, 28 deletions
| diff --git a/server/src/journal_commit.cc b/server/src/journal_commit.cc index 21d40c3..f2ff6c0 100644 --- a/server/src/journal_commit.cc +++ b/server/src/journal_commit.cc @@ -52,6 +52,12 @@  #include "template.h"  #include "templateparser.h" +class ResumeEntry { +public: +  std::string resume; +  std::string macro; +}; +  static inline bool iswhitespace(char c)  {    return c == ' ' || c == '\n' || c == '\t'; @@ -224,7 +230,7 @@ void JournalWriter::addEntry(Transaction &transaction, Commit &commit,    if(index >= templ->macros.size()) {      PRACRO_ERR(journal, "Could not find macro %s in template %s\n", -                 commit.macro.c_str(), templname.c_str()); +               commit.macro.c_str(), templname.c_str());      //      return;    } else {      PRACRO_DEBUG(journal, "Found macro %s as index %u in template %s\n", @@ -261,28 +267,6 @@ void JournalWriter::addEntry(Transaction &transaction, Commit &commit,    std::string r = stripTrailingWhitepace(addNewlines(resume, 60));    std::string m = commit.macro; -  /* -  // If macro already exists, overwrite with this entry, otherwise, just add it -  int idx = -1; -  std::vector< ResumeEntry >::iterator i = entrylist.begin(); -  int cnt = 0; -  while(i != entrylist.end()) { -    if(i->macro == m) idx = cnt; -    cnt++; -    i++; -  } - -  if(idx != -1) { -    entrylist[idx].resume = r; -    entrylist[idx].macro = m; -  } else { -    ResumeEntry re; -    re.resume = r; -    re.macro = m; -    entrylist.push_back(re); -  } -  */ -    ResumeEntry re;    re.resume = r;    re.macro = m; diff --git a/server/src/journal_commit.h b/server/src/journal_commit.h index 9122703..2d6e092 100644 --- a/server/src/journal_commit.h +++ b/server/src/journal_commit.h @@ -32,11 +32,7 @@  #include "transaction.h" -class ResumeEntry { -public: -  std::string resume; -  std::string macro; -}; +class ResumeEntry;  class JournalWriter {  public: | 
