Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -675,14 +675,14 @@ void AzAssetBrowserRequestHandler::OpenAssetInAssociatedEditor(const AZ::Data::A
|
||||
firstValidOpener = &openerDetails;
|
||||
}
|
||||
// bind a callback such that when the menu item is clicked, it sets that as the opener to use.
|
||||
menu.addAction(openerDetails.m_iconToUse, QObject::tr(openerDetails.m_displayText.c_str()), mainWindow, AZStd::bind(switchToOpener, &openerDetails));
|
||||
menu.addAction(openerDetails.m_iconToUse, QObject::tr(openerDetails.m_displayText.c_str()), mainWindow, [switchToOpener, details = &openerDetails] { return switchToOpener(details); });
|
||||
}
|
||||
}
|
||||
|
||||
if (numValidOpeners > 1) // more than one option was added
|
||||
{
|
||||
menu.addSeparator();
|
||||
menu.addAction(QObject::tr("Cancel"), AZStd::bind(switchToOpener, nullptr)); // just something to click on to avoid doing anything.
|
||||
menu.addAction(QObject::tr("Cancel"), [switchToOpener] { return switchToOpener(nullptr); }); // just something to click on to avoid doing anything.
|
||||
menu.exec(QCursor::pos());
|
||||
}
|
||||
else if (numValidOpeners == 1)
|
||||
|
||||
@@ -145,7 +145,7 @@ bool UserPopupWidgetHandler::ReadValuesIntoGUI(size_t index, UserPropertyEditor*
|
||||
QWidget* FloatCurveHandler::CreateGUI(QWidget *pParent)
|
||||
{
|
||||
CSplineCtrl *cSpline = new CSplineCtrl(pParent);
|
||||
cSpline->SetUpdateCallback(AZStd::bind(&FloatCurveHandler::OnSplineChange, this, AZStd::placeholders::_1));
|
||||
cSpline->SetUpdateCallback([this](CSplineCtrl* spl) { OnSplineChange(spl); });
|
||||
cSpline->SetTimeRange(0, 1);
|
||||
cSpline->SetValueRange(0, 1);
|
||||
cSpline->SetGrid(12, 12);
|
||||
|
||||
@@ -172,8 +172,8 @@ ReflectedPropertyItem::ReflectedPropertyItem(ReflectedPropertyControl *control,
|
||||
if (parent)
|
||||
parent->AddChild(this);
|
||||
|
||||
m_onSetCallback = AZStd::bind(&ReflectedPropertyItem::OnVariableChange, this, AZStd::placeholders::_1);
|
||||
m_onSetEnumCallback = AZStd::bind(&ReflectedPropertyItem::OnVariableEnumChange, this, AZStd::placeholders::_1);
|
||||
m_onSetCallback = [this](IVariable* var) { OnVariableChange(var); };
|
||||
m_onSetEnumCallback = [this](IVariable* var) { OnVariableEnumChange(var); };
|
||||
}
|
||||
|
||||
ReflectedPropertyItem::~ReflectedPropertyItem()
|
||||
|
||||
@@ -2634,7 +2634,6 @@ void EditorViewportWidget::ShowCursor()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void EditorViewportWidget::PushDisableRendering()
|
||||
{
|
||||
assert(m_disableRenderingCount >= 0);
|
||||
++m_disableRenderingCount;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace UnitTest
|
||||
m_inputChannelMapper = AZStd::make_unique<AzToolsFramework::QtEventToAzInputMapper>(m_rootWidget.get(), TestViewportId);
|
||||
}
|
||||
|
||||
void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
m_inputChannelMapper.reset();
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ namespace UnitTest
|
||||
void Disconnect();
|
||||
|
||||
// EditorInteractionSystemViewportSelectionRequestBus overrides ...
|
||||
void SetHandler(const AzToolsFramework::ViewportSelectionRequestsBuilderFn& interactionRequestsBuilder);
|
||||
void SetDefaultHandler();
|
||||
bool InternalHandleMouseViewportInteraction(const MouseInteractionEvent& mouseInteraction);
|
||||
bool InternalHandleMouseManipulatorInteraction(const MouseInteractionEvent& mouseInteraction);
|
||||
void SetHandler(const AzToolsFramework::ViewportSelectionRequestsBuilderFn& interactionRequestsBuilder) override;
|
||||
void SetDefaultHandler() override;
|
||||
bool InternalHandleMouseViewportInteraction(const MouseInteractionEvent& mouseInteraction) override;
|
||||
bool InternalHandleMouseManipulatorInteraction(const MouseInteractionEvent& mouseInteraction) override;
|
||||
|
||||
AZStd::function<bool(const MouseInteractionEvent& mouseInteraction)> m_internalHandleMouseViewportInteraction;
|
||||
AZStd::function<bool(const MouseInteractionEvent& mouseInteraction)> m_internalHandleMouseManipulatorInteraction;
|
||||
@@ -92,7 +92,7 @@ namespace UnitTest
|
||||
m_inputChannelMapper = AZStd::make_unique<AzToolsFramework::QtEventToAzInputMapper>(m_rootWidget.get(), TestViewportId);
|
||||
}
|
||||
|
||||
void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
m_inputChannelMapper.reset();
|
||||
|
||||
|
||||
@@ -1767,7 +1767,7 @@ void MainWindow::RegisterOpenWndCommands()
|
||||
cmdUI.tooltip = (QString("Open ") + className).toUtf8().data();
|
||||
cmdUI.iconFilename = className.toUtf8().data();
|
||||
GetIEditor()->GetCommandManager()->RegisterUICommand("editor", openCommandName.toUtf8().data(),
|
||||
"", "", AZStd::bind(&CEditorOpenViewCommand::Execute, pCmd), cmdUI);
|
||||
"", "", [pCmd] { pCmd->Execute(); }, cmdUI);
|
||||
GetIEditor()->GetCommandManager()->GetUIInfo("editor", openCommandName.toUtf8().data(), cmdUI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1515,8 +1515,8 @@ void CBaseObject::Serialize(CObjectArchive& ar)
|
||||
SetFrozen(bFrozen);
|
||||
SetHidden(bHidden);
|
||||
|
||||
ar.SetResolveCallback(this, parentId, AZStd::bind(&CBaseObject::ResolveParent, this, AZStd::placeholders::_1 ));
|
||||
ar.SetResolveCallback(this, lookatId, AZStd::bind(&CBaseObject::SetLookAt, this, AZStd::placeholders::_1));
|
||||
ar.SetResolveCallback(this, parentId, [this](CBaseObject* parent) { ResolveParent(parent); });
|
||||
ar.SetResolveCallback(this, lookatId, [this](CBaseObject* target) { SetLookAt(target); });
|
||||
|
||||
InvalidateTM(0);
|
||||
SetModified(false);
|
||||
@@ -2038,7 +2038,7 @@ bool CBaseObject::HitHelperAtTest(HitContext& hc, const Vec3& pos)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CBaseObject* CBaseObject::GetChild(size_t const i) const
|
||||
{
|
||||
assert(i >= 0 && i < m_childs.size());
|
||||
assert(i < m_childs.size());
|
||||
return m_childs[i];
|
||||
}
|
||||
|
||||
@@ -2729,7 +2729,7 @@ void CBaseObject::SetMinSpec(uint32 nSpec, bool bSetChildren)
|
||||
// Set min spec for all childs.
|
||||
if (bSetChildren)
|
||||
{
|
||||
for (size_t i = m_childs.size() - 1; i >= 0; --i)
|
||||
for (int i = static_cast<int>(m_childs.size()) - 1; i >= 0; --i)
|
||||
{
|
||||
m_childs[i]->SetMinSpec(nSpec, true);
|
||||
}
|
||||
|
||||
@@ -230,25 +230,25 @@ CEntityObject::CEntityObject()
|
||||
m_attachmentType = eAT_Pivot;
|
||||
|
||||
// cache all the variable callbacks, must match order of enum defined in header
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnAreaHeightChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnAreaLightChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnAreaLightSizeChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnAreaWidthChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnBoxHeightChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnBoxLengthChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnBoxProjectionChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnBoxSizeXChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnBoxSizeYChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnBoxSizeZChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnBoxWidthChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnColorChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnInnerRadiusChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnOuterRadiusChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnProjectInAllDirsChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnProjectorFOVChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnProjectorTextureChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnPropertyChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.push_back(AZStd::bind(&CEntityObject::OnRadiusChange, this, AZStd::placeholders::_1));
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnAreaHeightChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnAreaLightChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnAreaLightSizeChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnAreaWidthChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnBoxHeightChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnBoxLengthChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnBoxProjectionChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnBoxSizeXChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnBoxSizeYChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnBoxSizeZChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnBoxWidthChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnColorChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnInnerRadiusChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnOuterRadiusChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnProjectInAllDirsChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnProjectorFOVChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnProjectorTextureChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnPropertyChange(var); });
|
||||
m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnRadiusChange(var); });
|
||||
}
|
||||
|
||||
CEntityObject::~CEntityObject()
|
||||
@@ -938,11 +938,14 @@ void CEntityObject::Serialize(CObjectArchive& ar)
|
||||
eventTarget->getAttr("TargetId", targetId);
|
||||
eventTarget->getAttr("Event", et.event);
|
||||
eventTarget->getAttr("SourceEvent", et.sourceEvent);
|
||||
m_eventTargets.push_back(et);
|
||||
m_eventTargets.emplace_back(AZStd::move(et));
|
||||
if (targetId != GUID_NULL)
|
||||
{
|
||||
using namespace AZStd::placeholders;
|
||||
ar.SetResolveCallback(this, targetId, AZStd::bind(&CEntityObject::ResolveEventTarget, this, _1, _2), i);
|
||||
ar.SetResolveCallback(
|
||||
this, targetId,
|
||||
[this](CBaseObject* object, unsigned int index) { ResolveEventTarget(object, index); },
|
||||
i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1413,7 +1416,7 @@ void CEntityObject::PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx
|
||||
void CEntityObject::ResolveEventTarget(CBaseObject* object, unsigned int index)
|
||||
{
|
||||
// Find target id.
|
||||
assert(index >= 0 && index < m_eventTargets.size());
|
||||
assert(index < m_eventTargets.size());
|
||||
if (object)
|
||||
{
|
||||
object->AddEventListener(this);
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
|
||||
namespace DrawingPrimitives
|
||||
{
|
||||
void DrawTimeSlider(QPainter& painter, const QPalette& palette, const STimeSliderOptions& options)
|
||||
|
||||
@@ -110,7 +110,7 @@ void CTrackViewKeyPropertiesDlg::PopulateVariables()
|
||||
m_wndProps->RemoveAllItems();
|
||||
m_wndProps->AddVarBlock(m_pVarBlock);
|
||||
|
||||
m_wndProps->SetUpdateCallback(AZStd::bind(&CTrackViewKeyPropertiesDlg::OnVarChange, this, AZStd::placeholders::_1));
|
||||
m_wndProps->SetUpdateCallback([this](IVariable* var) { OnVarChange(var); });
|
||||
//m_wndProps->m_props.ExpandAll();
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
}
|
||||
void Undo(bool bUndo) override
|
||||
{
|
||||
for (size_t i = m_undoSteps.size() - 1; i >= 0; i--)
|
||||
for (int i = static_cast<int>(m_undoSteps.size()) - 1; i >= 0; i--)
|
||||
{
|
||||
m_undoSteps[i]->Undo(bUndo);
|
||||
}
|
||||
|
||||
@@ -58,36 +58,26 @@ bool C3DConnexionDriver::InitDevice()
|
||||
//Doc says RIM_TYPEHID: Data comes from an HID that is not a keyboard or a mouse.
|
||||
if (m_pRawInputDeviceList[i].dwType == RIM_TYPEHID)
|
||||
{
|
||||
UINT nchars = 300;
|
||||
TCHAR deviceName[300];
|
||||
if (GetRawInputDeviceInfo(m_pRawInputDeviceList[i].hDevice,
|
||||
RIDI_DEVICENAME, deviceName, &nchars) >= 0)
|
||||
{
|
||||
//_RPT3(_CRT_WARN, "Device[%d]: handle=0x%x name = %S\n", i, g_pRawInputDeviceList[i].hDevice, deviceName);
|
||||
}
|
||||
|
||||
RID_DEVICE_INFO dinfo;
|
||||
UINT sizeofdinfo = sizeof(dinfo);
|
||||
dinfo.cbSize = sizeofdinfo;
|
||||
if (GetRawInputDeviceInfo(m_pRawInputDeviceList[i].hDevice,
|
||||
RIDI_DEVICEINFO, &dinfo, &sizeofdinfo) >= 0)
|
||||
GetRawInputDeviceInfo(m_pRawInputDeviceList[i].hDevice,
|
||||
RIDI_DEVICEINFO, &dinfo, &sizeofdinfo);
|
||||
if (dinfo.dwType == RIM_TYPEHID)
|
||||
{
|
||||
if (dinfo.dwType == RIM_TYPEHID)
|
||||
RID_DEVICE_INFO_HID* phidInfo = &dinfo.hid;
|
||||
// Add this one to the list of interesting devices?
|
||||
// Actually only have to do this once to get input from all usage 1, usagePage 8 devices
|
||||
// This just keeps out the other usages.
|
||||
// You might want to put up a list for users to select amongst the different devices.
|
||||
// In particular, to assign separate functionality to the different devices.
|
||||
if (phidInfo->usUsagePage == 1 && phidInfo->usUsage == 8)
|
||||
{
|
||||
RID_DEVICE_INFO_HID* phidInfo = &dinfo.hid;
|
||||
// Add this one to the list of interesting devices?
|
||||
// Actually only have to do this once to get input from all usage 1, usagePage 8 devices
|
||||
// This just keeps out the other usages.
|
||||
// You might want to put up a list for users to select amongst the different devices.
|
||||
// In particular, to assign separate functionality to the different devices.
|
||||
if (phidInfo->usUsagePage == 1 && phidInfo->usUsage == 8)
|
||||
{
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsagePage = phidInfo->usUsagePage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsage = phidInfo->usUsage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].dwFlags = 0;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].hwndTarget = nullptr;
|
||||
m_nUsagePage1Usage8Devices++;
|
||||
}
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsagePage = phidInfo->usUsagePage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsage = phidInfo->usUsage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].dwFlags = 0;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].hwndTarget = nullptr;
|
||||
m_nUsagePage1Usage8Devices++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ bool CKDTree::FindNearestVertexRecursively(KDTreeNode* pNode, const Vec3& raySrc
|
||||
uint32 nVertexIndex = pNode->GetVertexIndex(i);
|
||||
uint32 nObjIndex = pNode->GetObjIndex(i);
|
||||
|
||||
assert(nObjIndex < m_StatObjectList.size() && nObjIndex >= 0);
|
||||
assert(nObjIndex < m_StatObjectList.size());
|
||||
|
||||
const SStatObj* pStatObjInfo = &(m_StatObjectList[nObjIndex]);
|
||||
|
||||
|
||||
@@ -769,7 +769,9 @@ namespace
|
||||
|
||||
void PySetViewPaneLayout(unsigned int layoutId)
|
||||
{
|
||||
AZ_PUSH_DISABLE_WARNING(4296, "-Wunknown-warning-option")
|
||||
if ((layoutId >= ET_Layout0) && (layoutId <= ET_Layout8))
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
CLayoutWnd* layout = GetIEditor()->GetViewManager()->GetLayout();
|
||||
if (layout)
|
||||
|
||||
Reference in New Issue
Block a user