From f22cfa177e6c692f3d3145f2d0f6212150505e02 Mon Sep 17 00:00:00 2001
From: Rodrigo Braz Monteiro <zeratul@cellosoft.com>
Date: Sat, 22 Nov 2008 19:56:41 +0000
Subject: [PATCH] More interface cleanup.

Originally committed to SVN as r2478.
---
 athenasub/include/athenasub/interfaces.h | 10 +---------
 athenasub/src/model.cpp                  |  4 ++--
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/athenasub/include/athenasub/interfaces.h b/athenasub/include/athenasub/interfaces.h
index 786cf0455..273da412d 100644
--- a/athenasub/include/athenasub/interfaces.h
+++ b/athenasub/include/athenasub/interfaces.h
@@ -47,7 +47,7 @@ class wxOutputStream;
 
 namespace Athenasub {
 
-	// Prototypes
+	// Forward references
 	class Range;
 	class Reader;
 	class Writer;
@@ -64,8 +64,6 @@ namespace Athenasub {
 	class INotification;
 	class ISection;
 	class IDeltaCoder;
-	class CController;
-	class CAction;
 	class IAction;
 
 
@@ -326,12 +324,6 @@ namespace Athenasub {
 
 	// Action list
 	class IActionList {
-		friend class CModel;
-
-	protected:
-		virtual std::list<Action> GetActions() = 0;
-		virtual void AddActionStart(Action action) = 0;
-
 	public:
 		virtual ~IActionList() {}
 
diff --git a/athenasub/src/model.cpp b/athenasub/src/model.cpp
index 8137aae9e..20d56c498 100644
--- a/athenasub/src/model.cpp
+++ b/athenasub/src/model.cpp
@@ -75,11 +75,11 @@ void CModel::ProcessActionList(CActionList &_actionList,int type)
 {
 	// Copy the list
 	//shared_ptr<CActionList> actions = shared_ptr<CActionList>(new CActionList(_actionList));
-	ActionList actions = ActionList(new CActionList(_actionList));
+	shared_ptr<CActionList> actions = shared_ptr<CActionList>(new CActionList(_actionList));
 	bool canUndo = actions->CanUndo();
 
 	// Setup undo
-	ActionList undo = ActionList(new CActionList(actions->GetModel(),actions->GetName(),actions->GetOwner(),canUndo));
+	shared_ptr<CActionList> undo = shared_ptr<CActionList>(new CActionList(actions->GetModel(),actions->GetName(),actions->GetOwner(),canUndo));
 	ActionStack *stack;
 	if (type == 1) stack = &redoStack;
 	else stack = &undoStack;
-- 
GitLab