mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 18:41:10 +02:00
Return std::make_shared
This commit is contained in:
parent
6e83e96d1c
commit
55ab0a394b
3 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ void LaserPointer::editRenderStatePath(const std::string& state, const QVariant&
|
||||||
PickResultPointer LaserPointer::getPickResultCopy(const PickResultPointer& pickResult) const {
|
PickResultPointer LaserPointer::getPickResultCopy(const PickResultPointer& pickResult) const {
|
||||||
auto rayPickResult = std::dynamic_pointer_cast<RayPickResult>(pickResult);
|
auto rayPickResult = std::dynamic_pointer_cast<RayPickResult>(pickResult);
|
||||||
if (!rayPickResult) {
|
if (!rayPickResult) {
|
||||||
std::make_shared<RayPickResult>();
|
return std::make_shared<RayPickResult>();
|
||||||
}
|
}
|
||||||
return std::make_shared<RayPickResult>(*rayPickResult.get());
|
return std::make_shared<RayPickResult>(*rayPickResult.get());
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ ParabolaPointer::ParabolaPointer(const QVariant& rayProps, const RenderStateMap&
|
||||||
PickResultPointer ParabolaPointer::getPickResultCopy(const PickResultPointer& pickResult) const {
|
PickResultPointer ParabolaPointer::getPickResultCopy(const PickResultPointer& pickResult) const {
|
||||||
auto parabolaPickResult = std::dynamic_pointer_cast<ParabolaPickResult>(pickResult);
|
auto parabolaPickResult = std::dynamic_pointer_cast<ParabolaPickResult>(pickResult);
|
||||||
if (!parabolaPickResult) {
|
if (!parabolaPickResult) {
|
||||||
std::make_shared<ParabolaPickResult>();
|
return std::make_shared<ParabolaPickResult>();
|
||||||
}
|
}
|
||||||
return std::make_shared<ParabolaPickResult>(*parabolaPickResult.get());
|
return std::make_shared<ParabolaPickResult>(*parabolaPickResult.get());
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ bool StylusPointer::shouldTrigger(const PickResultPointer& pickResult) {
|
||||||
PickResultPointer StylusPointer::getPickResultCopy(const PickResultPointer& pickResult) const {
|
PickResultPointer StylusPointer::getPickResultCopy(const PickResultPointer& pickResult) const {
|
||||||
auto stylusPickResult = std::dynamic_pointer_cast<StylusPickResult>(pickResult);
|
auto stylusPickResult = std::dynamic_pointer_cast<StylusPickResult>(pickResult);
|
||||||
if (!stylusPickResult) {
|
if (!stylusPickResult) {
|
||||||
std::make_shared<StylusPickResult>();
|
return std::make_shared<StylusPickResult>();
|
||||||
}
|
}
|
||||||
return std::make_shared<StylusPickResult>(*stylusPickResult.get());
|
return std::make_shared<StylusPickResult>(*stylusPickResult.get());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue