Skip to content
Snippets Groups Projects
Commit 350c1904 authored by Mick Jordan's avatar Mick Jordan
Browse files

Merge

parents 164d4de8 104adb5f
No related branches found
No related tags found
No related merge requests found
......@@ -428,6 +428,9 @@ public abstract class UpdateArrayHelperNode extends RNode {
if (positions.getNames() != null) {
posNames.enter();
RStringVector names = getNamesVector(resultVector);
if (names.isShared()) {
names = (RStringVector) names.copy();
}
RStringVector newNames = positions.getNames();
namesNACheck.enable(newNames);
for (int i = 0; i < positions.getLength(); i++) {
......
......@@ -118,13 +118,12 @@ public abstract class RVector extends RBounded implements RShareable, RAbstractV
public final RStringVector getNames() {
if (names == null) {
if (dimNames != null && dimNames.getLength() == 1) {
RStringVector res = (RStringVector) dimNames.getDataAt(0);
return res.isShared() ? (RStringVector) res.copy() : res;
return (RStringVector) dimNames.getDataAt(0);
} else {
return null;
}
} else {
return names.isShared() ? (RStringVector) names.copy() : names;
return names;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment