mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 17:05:37 +00:00
CSceneNode: Return getters by const reference where applicable
Avoids a few unnecessary copies.
This commit is contained in:
@@ -41,13 +41,13 @@ bool WCreateTab::eventFilter(QObject *pObj, QEvent *pEvent)
|
||||
|
||||
else if (pEvent->type() == QEvent::Drop)
|
||||
{
|
||||
QDropEvent *pDropEvent = static_cast<QDropEvent*>(pEvent);
|
||||
const CTemplateMimeData *pMimeData = qobject_cast<const CTemplateMimeData*>(pDropEvent->mimeData());
|
||||
const auto* pDropEvent = static_cast<QDropEvent*>(pEvent);
|
||||
const auto* pMimeData = qobject_cast<const CTemplateMimeData*>(pDropEvent->mimeData());
|
||||
|
||||
if (pMimeData)
|
||||
{
|
||||
CVector3f SpawnPoint = mpEditor->Viewport()->HoverPoint();
|
||||
CCreateInstanceCommand *pCmd = new CCreateInstanceCommand(mpEditor, pMimeData->Template(), mpSpawnLayer, SpawnPoint);
|
||||
const CVector3f& SpawnPoint = mpEditor->Viewport()->HoverPoint();
|
||||
auto* pCmd = new CCreateInstanceCommand(mpEditor, pMimeData->Template(), mpSpawnLayer, SpawnPoint);
|
||||
mpEditor->UndoStack().push(pCmd);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user