mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 20:22:22 +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 {
|
||||
auto rayPickResult = std::dynamic_pointer_cast<RayPickResult>(pickResult);
|
||||
if (!rayPickResult) {
|
||||
std::make_shared<RayPickResult>();
|
||||
return std::make_shared<RayPickResult>();
|
||||
}
|
||||
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 {
|
||||
auto parabolaPickResult = std::dynamic_pointer_cast<ParabolaPickResult>(pickResult);
|
||||
if (!parabolaPickResult) {
|
||||
std::make_shared<ParabolaPickResult>();
|
||||
return std::make_shared<ParabolaPickResult>();
|
||||
}
|
||||
return std::make_shared<ParabolaPickResult>(*parabolaPickResult.get());
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ bool StylusPointer::shouldTrigger(const PickResultPointer& pickResult) {
|
|||
PickResultPointer StylusPointer::getPickResultCopy(const PickResultPointer& pickResult) const {
|
||||
auto stylusPickResult = std::dynamic_pointer_cast<StylusPickResult>(pickResult);
|
||||
if (!stylusPickResult) {
|
||||
std::make_shared<StylusPickResult>();
|
||||
return std::make_shared<StylusPickResult>();
|
||||
}
|
||||
return std::make_shared<StylusPickResult>(*stylusPickResult.get());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue