::getIndex() should never return -1 if ::file() is not null so no check needed there..

Sat, 17 Aug 2013 00:02:17 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sat, 17 Aug 2013 00:02:17 +0300
changeset 446
608948d27e57
parent 445
15c3af0b5cb7
child 447
b2bd8fb41781

::getIndex() should never return -1 if ::file() is not null so no check needed there..

src/ldtypes.cpp file | annotate | diff | comparison | revisions
--- a/src/ldtypes.cpp	Fri Aug 16 23:59:09 2013 +0300
+++ b/src/ldtypes.cpp	Sat Aug 17 00:02:17 2013 +0300
@@ -641,7 +641,7 @@
 template<class T> void changeProperty (LDObject* obj, T* ptr, const T& val) {
 	long idx;
 	
-	if (obj->file() && (idx = obj->getIndex()) != -1) {
+	if (obj->file()) {
 		str before = obj->raw();
 		*ptr = val;
 		str after = obj->raw();

mercurial