aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-20 08:51:26 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-20 08:51:26 +1000
commit81b1bf6c265f77dd38901f76cdb4c97b3e85fd79 (patch)
tree157b6d48765c5cbc7863a7710f383615df6b38ec /src
parent1cee960e86b1ffee375df8f543e755afc96d46ff (diff)
downloadscintilla-mirror-81b1bf6c265f77dd38901f76cdb4c97b3e85fd79.tar.gz
Backport: Feature [feature-requests:#1215]. Fix forwarding reference warnings.
Backport of changeset 6711:8d202ec5a734.
Diffstat (limited to 'src')
-rw-r--r--src/ContractionState.cxx3
-rw-r--r--src/SparseVector.h4
-rw-r--r--src/SplitVector.h4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx
index be3c3d6ad..5937be6fc 100644
--- a/src/ContractionState.cxx
+++ b/src/ContractionState.cxx
@@ -286,7 +286,8 @@ bool ContractionState<LINE>::SetFoldDisplayText(Sci::Line lineDoc, const char *t
EnsureData();
const char *foldText = foldDisplayTexts->ValueAt(lineDoc).get();
if (!foldText || !text || 0 != strcmp(text, foldText)) {
- foldDisplayTexts->SetValueAt(lineDoc, UniqueStringCopy(text));
+ UniqueString uns = UniqueStringCopy(text);
+ foldDisplayTexts->SetValueAt(lineDoc, std::move(uns));
Check();
return true;
} else {
diff --git a/src/SparseVector.h b/src/SparseVector.h
index 1b59f3570..df42e4511 100644
--- a/src/SparseVector.h
+++ b/src/SparseVector.h
@@ -77,11 +77,11 @@ public:
if (position == startPartition) {
// Already a value at this position, so replace
ClearValue(partition);
- values->SetValueAt(partition, std::move(value));
+ values->SetValueAt(partition, std::forward<ParamType>(value));
} else {
// Insert a new element
starts->InsertPartition(partition + 1, position);
- values->Insert(partition + 1, std::move(value));
+ values->Insert(partition + 1, std::forward<ParamType>(value));
}
}
}
diff --git a/src/SplitVector.h b/src/SplitVector.h
index 16dec6e98..3fb595eef 100644
--- a/src/SplitVector.h
+++ b/src/SplitVector.h
@@ -130,14 +130,14 @@ public:
if (position < 0) {
;
} else {
- body[position] = std::move(v);
+ body[position] = std::forward<ParamType>(v);
}
} else {
PLATFORM_ASSERT(position < lengthBody);
if (position >= lengthBody) {
;
} else {
- body[gapLength + position] = std::move(v);
+ body[gapLength + position] = std::forward<ParamType>(v);
}
}
}