For some reason, of all changesets, 4fb5763 made compiling subfiles extremely slow. WTF? Reverted the change to restore compilation speed.

Wed, 04 Sep 2013 11:54:17 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Wed, 04 Sep 2013 11:54:17 +0300
changeset 486
25747c37c7be
parent 485
543a6696096f
child 487
a350c4b25133
child 491
7d1b5ecd76c0

For some reason, of all changesets, 4fb5763 made compiling subfiles extremely slow. WTF? Reverted the change to restore compilation speed.

src/ldtypes.cpp file | annotate | diff | comparison | revisions
--- a/src/ldtypes.cpp	Wed Sep 04 11:34:19 2013 +0300
+++ b/src/ldtypes.cpp	Wed Sep 04 11:54:17 2013 +0300
@@ -647,8 +647,9 @@
 // makes history stuff work out of the box.
 // -----------------------------------------------------------------------------
 template<class T> void changeProperty (LDObject* obj, T* ptr, const T& val) {
-	if (obj->file()) {
-		long idx = obj->getIndex();
+	long idx;
+	
+	if (obj->file() && (idx = obj->getIndex()) != -1) {
 		str before = obj->raw();
 		*ptr = val;
 		str after = obj->raw();

mercurial