aboutsummaryrefslogtreecommitdiff
path: root/editors/xenon/files/patch-XeText.C
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-12-03 23:21:53 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-12-03 23:21:53 +0000
commit42ff63f8912e017692706d9f744e0ba3974acd15 (patch)
tree951fbb6ede4ac8f78b9c1def1767d7d8df7f7adb /editors/xenon/files/patch-XeText.C
parent2f11c200752c95ccd4339e352832e8361a62ca06 (diff)
downloadports-42ff63f8912e017692706d9f744e0ba3974acd15.tar.gz
ports-42ff63f8912e017692706d9f744e0ba3974acd15.zip
- Unbreak fix build on 5.X
PR: ports/106198 Submitted by: Peter Johnson <johnson.peter@gmail.com>
Notes
Notes: svn path=/head/; revision=178768
Diffstat (limited to 'editors/xenon/files/patch-XeText.C')
-rw-r--r--editors/xenon/files/patch-XeText.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/editors/xenon/files/patch-XeText.C b/editors/xenon/files/patch-XeText.C
new file mode 100644
index 000000000000..502514913159
--- /dev/null
+++ b/editors/xenon/files/patch-XeText.C
@@ -0,0 +1,33 @@
+--- XeText.C.orig Sat Jan 5 20:39:39 2002
++++ XeText.C Fri Dec 1 21:25:34 2006
+@@ -1612,26 +1612,19 @@
+
+ if(_numUndos >= _maxUndos) {
+
+- // $$$ calling previous() here assums _undoList is not empty
+- // previous() is O(N) where N is the number of undo items in the list
+- // if this turns out to be too much of a performance penalty, use
+- // std::list instead of std::slist for _undoList
+-
+- std::slist<Undo*>::iterator pos = _undoList.previous(_undoList.end());
+- Undo* undo = *pos;
++ Undo* undo = _undoList.back();
+
+ _undoBuf.remove(KRBUF_END, _undoBuf.length() - undo->len);
+ delete undo;
+- _undoList.erase(pos);
++ _undoList.pop_back();
+
+ if (!_undoList.empty()) {
+- pos = _undoList.previous(_undoList.end());
+- undo = *pos;
++ undo = _undoList.back();
+
+ if (undo && undo->type == InsertSelection) {
+ _undoBuf.remove(KRBUF_END, _undoBuf.length() - undo->len);
+ delete undo;
+- _undoList.erase(pos);
++ _undoList.pop_back();
+ }
+ }
+