Code cleanup

presentation
Andreas Butti 7 years ago
parent b3f2fded38
commit d7eb2a8048
  1. 21
      src/undo/UndoRedoHandler.cpp
  2. 2
      src/view/DocumentView.cpp

@ -5,7 +5,7 @@
#include <config.h>
#include <i18n.h>
#include <stdio.h>
#include <inttypes.h>
#ifdef UNDO_TRACE
@ -13,11 +13,11 @@ void printAction(UndoAction* action)
{
if (action)
{
cout << action << " / " << action->getClassName() << endl;
g_message("%" PRIu64 " / %s", (uint64_t)action, action->getClassName());
}
else
{
cout << "(null)" << endl;
g_message("(null)");
}
}
@ -34,12 +34,12 @@ void printUndoList(GList* list)
#ifdef UNDO_TRACE
#define PRINTCONTENTS() \
cout << "redoList" << endl; \
g_message("redoList"); \
printUndoList(this->redoList); \
cout << "undoList" << endl; \
g_message("undoList"); \
printUndoList(this->undoList); \
cout << endl << "savedUndo" << endl; \
if(this->savedUndo) \
g_message("savedUndo"); \
if (this->savedUndo) \
{ \
printAction(this->savedUndo); \
}
@ -79,7 +79,7 @@ void UndoRedoHandler::clearContents()
UndoAction* action = (UndoAction*) l->data;
#ifdef UNDO_TRACE
cout << boost::format("clearContents()::Delete UndoAction: %p / %s") % action % action->getClassName() << endl; //
g_message("clearContents()::Delete UndoAction: %" PRIu64 " / %s", (uint64_t)action, action->getClassName());
#endif //UNDO_TRACE
delete action;
@ -104,9 +104,8 @@ void UndoRedoHandler::clearRedo()
UndoAction* action = (UndoAction*) l->data;
#ifdef UNDO_TRACE
cout << "clearRedo()::Delete UndoAction: " << action
<< " / " << action->getClassName() << endl;
#endif //UNDO_TRACE
g_message("clearRedo()::Delete UndoAction: %" PRIu64 " / %s", (uint64_t)action, action->getClassName());
#endif
delete action;
}

@ -370,7 +370,7 @@ void DocumentView::drawLayer(cairo_t* cr, Layer* l)
}
#ifdef DEBUG_SHOW_REPAINT_BOUNDS
cout << bl::format("DBG:DocumentView: draw {1} / not draw {2}") % drawed % notDrawed << endl;
g_message("DBG:DocumentView: draw %i / not draw %i", drawed, notDrawed);
#endif // DEBUG_SHOW_REPAINT_BOUNDS
}

Loading…
Cancel
Save