--- a/src/toolsets/movetoolset.cpp Sat Jan 28 14:13:01 2017 +0200 +++ b/src/toolsets/movetoolset.cpp Sat Jan 28 14:14:28 2017 +0200 @@ -35,8 +35,8 @@ return; // If we move down, we need to iterate the array in reverse order. - int start = up ? 0 : (length(objs) - 1); - int end = up ? length(objs) : -1; + int start = up ? 0 : (countof(objs) - 1); + int end = up ? countof(objs) : -1; int increment = up ? 1 : -1; QSet<LDObject*> objsToCompile; LDDocument* file = objs[0]->document(); @@ -48,7 +48,7 @@ int idx = obj->lineNumber(); int target = idx + (up ? -1 : 1); - if ((up and idx == 0) or (not up and idx == length(file->objects()) - 1)) + if ((up and idx == 0) or (not up and idx == countof(file->objects()) - 1)) { // One of the objects hit the extrema. If this happens, this should be the first // object to be iterated on. Thus, nothing has changed yet and it's safe to just