[aseprite] 37/250: Change CelList and LayerList from std::list to std::vector
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:27:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 510a686020c2fbf5379d6c68969276488457ecbb
Author: David Capello <davidcapello at gmail.com>
Date: Mon Sep 14 17:37:21 2015 -0300
Change CelList and LayerList from std::list to std::vector
This change gives us an huge performance improvement to paint the
Timeline widget.
---
src/doc/cel_list.h | 10 +++++-----
src/doc/layer.cpp | 2 +-
src/doc/layer_list.h | 10 +++++-----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/doc/cel_list.h b/src/doc/cel_list.h
index 174e396..993cab1 100644
--- a/src/doc/cel_list.h
+++ b/src/doc/cel_list.h
@@ -1,5 +1,5 @@
// Aseprite Document Library
-// Copyright (c) 2001-2014 David Capello
+// Copyright (c) 2001-2015 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@@ -8,15 +8,15 @@
#define DOC_CEL_LIST_H_INCLUDED
#pragma once
-#include <list>
+#include <vector>
namespace doc {
class Cel;
- typedef std::list<Cel*> CelList;
- typedef std::list<Cel*>::iterator CelIterator;
- typedef std::list<Cel*>::const_iterator CelConstIterator;
+ typedef std::vector<Cel*> CelList;
+ typedef CelList::iterator CelIterator;
+ typedef CelList::const_iterator CelConstIterator;
} // namespace doc
diff --git a/src/doc/layer.cpp b/src/doc/layer.cpp
index ef09f70..4d574bc 100644
--- a/src/doc/layer.cpp
+++ b/src/doc/layer.cpp
@@ -316,7 +316,7 @@ void LayerFolder::stackLayer(Layer* layer, Layer* after)
m_layers.insert(after_it, layer);
}
else
- m_layers.push_front(layer);
+ m_layers.insert(m_layers.begin(), layer);
}
void LayerFolder::displaceFrames(frame_t fromThis, frame_t delta)
diff --git a/src/doc/layer_list.h b/src/doc/layer_list.h
index 941a453..82aaa57 100644
--- a/src/doc/layer_list.h
+++ b/src/doc/layer_list.h
@@ -1,5 +1,5 @@
// Aseprite Document Library
-// Copyright (c) 2001-2014 David Capello
+// Copyright (c) 2001-2015 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@@ -8,15 +8,15 @@
#define DOC_LAYER_LIST_H_INCLUDED
#pragma once
-#include <list>
+#include <vector>
namespace doc {
class Layer;
- typedef std::list<Layer*> LayerList;
- typedef std::list<Layer*>::iterator LayerIterator;
- typedef std::list<Layer*>::const_iterator LayerConstIterator;
+ typedef std::vector<Layer*> LayerList;
+ typedef LayerList::iterator LayerIterator;
+ typedef LayerList::const_iterator LayerConstIterator;
} // namespace doc
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list