Linux/Clang fix warn-unused and related
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -327,7 +327,7 @@ void AzAssetBrowserRequestHandler::AddContextMenuActions(QWidget* caller, QMenu*
|
||||
if (!vetoOpenerFound)
|
||||
{
|
||||
// if we found no valid openers and no veto openers then just allow it to be opened with the operating system itself.
|
||||
menu->addAction(QObject::tr("Open with associated application..."), [this, fullFilePath]()
|
||||
menu->addAction(QObject::tr("Open with associated application..."), [fullFilePath]()
|
||||
{
|
||||
OpenWithOS(fullFilePath);
|
||||
});
|
||||
|
||||
@@ -130,7 +130,6 @@ private:
|
||||
private:
|
||||
ISplineInterpolator* m_pSpline;
|
||||
|
||||
bool m_bAutoDelete;
|
||||
bool m_bNoZoom;
|
||||
|
||||
QRect m_rcClipRect;
|
||||
|
||||
@@ -298,7 +298,6 @@ Lines CConsoleSCB::s_pendingLines;
|
||||
CConsoleSCB::CConsoleSCB(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::Console())
|
||||
, m_richEditTextLength(0)
|
||||
, m_backgroundTheme(gSettings.consoleBackgroundColorTheme)
|
||||
{
|
||||
m_lines = s_pendingLines;
|
||||
|
||||
@@ -191,7 +191,6 @@ private:
|
||||
void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
|
||||
QScopedPointer<Ui::Console> ui;
|
||||
int m_richEditTextLength;
|
||||
|
||||
Lines m_lines;
|
||||
static Lines s_pendingLines;
|
||||
|
||||
@@ -30,12 +30,6 @@ namespace ImageHistogram
|
||||
const QColor kGreenSectionColor = QColor(220, 255, 220);
|
||||
const QColor kBlueSectionColor = QColor(220, 220, 255);
|
||||
const QColor kSplitSeparatorColor = QColor(100, 100, 0);
|
||||
const QColor kButtonBackColor = QColor(20, 20, 20);
|
||||
const QColor kBtnLightColor(200, 200, 200);
|
||||
const QColor kBtnShadowColor(50, 50, 50);
|
||||
const int kButtonWidth = 40;
|
||||
const QColor kButtonTextColor(255, 255, 0);
|
||||
const int kTextLeftSpacing = 4;
|
||||
const int kTextFontSize = 70;
|
||||
const char* kTextFontFace = "Arial";
|
||||
const QColor kTextColor(255, 255, 255);
|
||||
|
||||
@@ -123,8 +123,6 @@ void CSplineCtrl::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
QRect rcClient = rect();
|
||||
|
||||
if (m_pSpline)
|
||||
{
|
||||
m_bSelectedKeys.resize(m_pSpline->GetKeyCount());
|
||||
|
||||
@@ -819,8 +819,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
|
||||
{
|
||||
const QPen pOldPen = painter->pen();
|
||||
|
||||
const QRect rcClip = painter->clipBoundingRect().intersected(m_rcSpline).toRect();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
ISplineInterpolator* pSpline = splineInfo.pSpline;
|
||||
ISplineInterpolator* pDetailSpline = splineInfo.pDetailSpline;
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
#include "ScopedVariableSetter.h"
|
||||
#include "GridUtils.h"
|
||||
|
||||
|
||||
static const QColor timeMarkerCol = QColor(255, 0, 255);
|
||||
static const QColor textCol = QColor(0, 0, 0);
|
||||
static const QColor ltgrayCol = QColor(110, 110, 110);
|
||||
|
||||
QColor InterpolateColor(const QColor& c1, const QColor& c2, float fraction)
|
||||
{
|
||||
const int r = static_cast<int>(static_cast<float>(c2.red() - c1.red()) * fraction + c1.red());
|
||||
|
||||
@@ -136,7 +136,6 @@ protected:
|
||||
void DrawFrameTicks(QPainter* dc);
|
||||
|
||||
private:
|
||||
bool m_bAutoDelete;
|
||||
QRect m_rcClient;
|
||||
QRect m_rcTimeline;
|
||||
float m_fTimeMarker;
|
||||
|
||||
@@ -82,8 +82,6 @@ public:
|
||||
newzoom.y = 0.01f;
|
||||
}
|
||||
|
||||
Vec2 prevz = zoom;
|
||||
|
||||
// Zoom to mouse position.
|
||||
float ofsx = origin.x;
|
||||
float ofsy = origin.y;
|
||||
|
||||
@@ -41,8 +41,6 @@ using namespace AZ;
|
||||
using namespace AzToolsFramework;
|
||||
|
||||
static const char* const s_LUAEditorName = "Lua Editor";
|
||||
static const char* const s_shortTimeInterval = "debug";
|
||||
static const char* const s_assetImporterMetricsIdentifier = "AssetImporter";
|
||||
|
||||
// top level menu ids
|
||||
static const char* const s_fileMenuId = "FileMenu";
|
||||
@@ -50,7 +48,6 @@ static const char* const s_editMenuId = "EditMenu";
|
||||
static const char* const s_gameMenuId = "GameMenu";
|
||||
static const char* const s_toolMenuId = "ToolMenu";
|
||||
static const char* const s_viewMenuId = "ViewMenu";
|
||||
static const char* const s_awsMenuId = "AwsMenu";
|
||||
static const char* const s_helpMenuId = "HelpMenu";
|
||||
|
||||
static bool CompareLayoutNames(const QString& name1, const QString& name2)
|
||||
@@ -157,13 +154,11 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
LevelEditorMenuHandler::LevelEditorMenuHandler(
|
||||
MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager, QSettings& settings)
|
||||
LevelEditorMenuHandler::LevelEditorMenuHandler(MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager)
|
||||
: QObject(mainWindow)
|
||||
, m_mainWindow(mainWindow)
|
||||
, m_viewPaneManager(viewPaneManager)
|
||||
, m_actionManager(mainWindow->GetActionManager())
|
||||
, m_settings(settings)
|
||||
{
|
||||
#if defined(AZ_PLATFORM_MAC)
|
||||
// Hide the non-native toolbar, then setNativeMenuBar to ensure it is always visible on macOS.
|
||||
|
||||
@@ -33,7 +33,7 @@ class LevelEditorMenuHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LevelEditorMenuHandler(MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager, QSettings& settings);
|
||||
LevelEditorMenuHandler(MainWindow* mainWindow, QtViewPaneManager* const viewPaneManager);
|
||||
~LevelEditorMenuHandler();
|
||||
|
||||
void Initialize();
|
||||
@@ -106,7 +106,6 @@ private:
|
||||
ActionManager::MenuWrapper m_toolsMenu;
|
||||
|
||||
QMenu* m_mostRecentLevelsMenu = nullptr;
|
||||
QMenu* m_mostRecentProjectsMenu = nullptr;
|
||||
QMenu* m_editmenu = nullptr;
|
||||
|
||||
ActionManager::MenuWrapper m_viewPanesMenu;
|
||||
@@ -117,7 +116,6 @@ private:
|
||||
int m_viewPaneVersion = 0;
|
||||
|
||||
QList<QMenu*> m_topLevelMenus;
|
||||
QSettings& m_settings;
|
||||
};
|
||||
|
||||
#endif // LEVELEDITORMENUHANDLER_H
|
||||
|
||||
@@ -342,7 +342,7 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename)
|
||||
// Register this level and its content hash as version
|
||||
GetIEditor()->GetSettingsManager()->AddToolVersion(fileName, levelHash);
|
||||
GetIEditor()->GetSettingsManager()->RegisterEvent(loadEvent);
|
||||
LOADING_TIME_PROFILE_SECTION(gEnv->pSystem);
|
||||
|
||||
CAutoDocNotReady autoDocNotReady;
|
||||
|
||||
HEAP_CHECK
|
||||
@@ -1018,14 +1018,6 @@ bool CCryEditDoc::AfterSaveDocument([[maybe_unused]] const QString& lpszPathName
|
||||
return bSaved;
|
||||
}
|
||||
|
||||
|
||||
static void GetUserSettingsFile(const QString& levelFolder, QString& userSettings)
|
||||
{
|
||||
const char* pUserName = GetISystem()->GetUserName();
|
||||
QString fileName = QStringLiteral("%1_usersettings.editor_xml").arg(pUserName);
|
||||
userSettings = Path::Make(levelFolder, fileName);
|
||||
}
|
||||
|
||||
static bool TryRenameFile(const QString& oldPath, const QString& newPath, int retryAttempts=10)
|
||||
{
|
||||
QFile(newPath).setPermissions(QFile::ReadOther | QFile::WriteOther);
|
||||
|
||||
@@ -97,11 +97,6 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
const char* PyGetGameFolder()
|
||||
{
|
||||
return Path::GetEditingGameDataFolder().c_str();
|
||||
}
|
||||
|
||||
AZStd::string PyGetGameFolderAsString()
|
||||
{
|
||||
return Path::GetEditingGameDataFolder();
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Description : Calculate the reference frame for sub-object selections.
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "SubObjectSelectionReferenceFrameCalculator.h"
|
||||
|
||||
SubObjectSelectionReferenceFrameCalculator::SubObjectSelectionReferenceFrameCalculator(ESubObjElementType selectionType)
|
||||
: m_anySelected(false)
|
||||
, pos(0.0f, 0.0f, 0.0f)
|
||||
, normal(0.0f, 0.0f, 0.0f)
|
||||
, nNormals(0)
|
||||
, selectionType(selectionType)
|
||||
, bUseExplicitFrame(false)
|
||||
, bExplicitAnySelected(false)
|
||||
{
|
||||
}
|
||||
|
||||
void SubObjectSelectionReferenceFrameCalculator::SetExplicitFrame(bool bAnySelected, const Matrix34& refFrame)
|
||||
{
|
||||
this->m_refFrame = refFrame;
|
||||
this->bUseExplicitFrame = true;
|
||||
this->bExplicitAnySelected = bAnySelected;
|
||||
}
|
||||
|
||||
bool SubObjectSelectionReferenceFrameCalculator::GetFrame(Matrix34& refFrame)
|
||||
{
|
||||
if (this->bUseExplicitFrame)
|
||||
{
|
||||
refFrame = this->m_refFrame;
|
||||
return this->bExplicitAnySelected;
|
||||
}
|
||||
else
|
||||
{
|
||||
refFrame.SetIdentity();
|
||||
|
||||
if (this->nNormals > 0)
|
||||
{
|
||||
this->normal = this->normal / static_cast<float>(this->nNormals);
|
||||
if (!this->normal.IsZero())
|
||||
{
|
||||
this->normal.Normalize();
|
||||
}
|
||||
|
||||
// Average position.
|
||||
this->pos = this->pos / static_cast<float>(this->nNormals);
|
||||
refFrame.SetTranslation(this->pos);
|
||||
}
|
||||
|
||||
if (this->m_anySelected)
|
||||
{
|
||||
if (!this->normal.IsZero())
|
||||
{
|
||||
Vec3 xAxis(1, 0, 0), yAxis(0, 1, 0), zAxis(0, 0, 1);
|
||||
if (this->normal.IsEquivalent(zAxis) || normal.IsEquivalent(-zAxis))
|
||||
{
|
||||
zAxis = xAxis;
|
||||
}
|
||||
xAxis = this->normal.Cross(zAxis).GetNormalized();
|
||||
yAxis = xAxis.Cross(this->normal).GetNormalized();
|
||||
refFrame.SetFromVectors(xAxis, yAxis, normal, pos);
|
||||
}
|
||||
}
|
||||
|
||||
return m_anySelected;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Description : Calculate the reference frame for sub-object selections.
|
||||
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_EDITMODE_SUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H
|
||||
#define CRYINCLUDE_EDITOR_EDITMODE_SUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "ISubObjectSelectionReferenceFrameCalculator.h"
|
||||
#include "Objects/SubObjSelection.h"
|
||||
|
||||
class SubObjectSelectionReferenceFrameCalculator
|
||||
: public ISubObjectSelectionReferenceFrameCalculator
|
||||
{
|
||||
public:
|
||||
SubObjectSelectionReferenceFrameCalculator(ESubObjElementType selectionType);
|
||||
|
||||
virtual void SetExplicitFrame(bool bAnySelected, const Matrix34& refFrame);
|
||||
bool GetFrame(Matrix34& refFrame);
|
||||
|
||||
private:
|
||||
bool m_anySelected;
|
||||
Vec3 pos;
|
||||
Vec3 normal;
|
||||
int nNormals;
|
||||
ESubObjElementType selectionType;
|
||||
std::vector<Vec3> positions;
|
||||
Matrix34 m_refFrame;
|
||||
bool bUseExplicitFrame;
|
||||
bool bExplicitAnySelected;
|
||||
};
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_EDITMODE_SUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H
|
||||
@@ -1976,12 +1976,12 @@ Vec3 EditorViewportWidget::ViewToWorld(
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
AZ_UNUSED(collideWithTerrain)
|
||||
AZ_UNUSED(onlyTerrain)
|
||||
AZ_UNUSED(bTestRenderMesh)
|
||||
AZ_UNUSED(bSkipVegetation)
|
||||
AZ_UNUSED(bSkipVegetation)
|
||||
AZ_UNUSED(collideWithObject)
|
||||
AZ_UNUSED(collideWithTerrain);
|
||||
AZ_UNUSED(onlyTerrain);
|
||||
AZ_UNUSED(bTestRenderMesh);
|
||||
AZ_UNUSED(bSkipVegetation);
|
||||
AZ_UNUSED(bSkipVegetation);
|
||||
AZ_UNUSED(collideWithObject);
|
||||
|
||||
auto ray = m_renderViewport->ViewportScreenToWorldRay(AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(vp));
|
||||
if (!ray.has_value())
|
||||
@@ -2005,9 +2005,9 @@ Vec3 EditorViewportWidget::ViewToWorld(
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
Vec3 EditorViewportWidget::ViewToWorldNormal(const QPoint& vp, bool onlyTerrain, bool bTestRenderMesh)
|
||||
{
|
||||
AZ_UNUSED(vp)
|
||||
AZ_UNUSED(onlyTerrain)
|
||||
AZ_UNUSED(bTestRenderMesh)
|
||||
AZ_UNUSED(vp);
|
||||
AZ_UNUSED(onlyTerrain);
|
||||
AZ_UNUSED(bTestRenderMesh);
|
||||
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
|
||||
@@ -17,12 +17,6 @@ AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
#include <ui_FBXExporterDialog.h>
|
||||
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
const uint kDefaultFPS = 30u;
|
||||
}
|
||||
|
||||
CFBXExporterDialog::CFBXExporterDialog(bool bDisplayOnlyFPSSetting, QWidget* pParent)
|
||||
: QDialog(pParent)
|
||||
, m_ui(new Ui::FBXExporterDialog)
|
||||
|
||||
@@ -497,8 +497,7 @@ bool CGameEngine::LoadLevel(
|
||||
[[maybe_unused]] bool bDeleteAIGraph,
|
||||
bool bReleaseResources)
|
||||
{
|
||||
LOADING_TIME_PROFILE_SECTION(GetIEditor()->GetSystem());
|
||||
m_bLevelLoaded = false;
|
||||
m_bLevelLoaded = false;
|
||||
CLogFile::FormatLine("Loading map '%s' into engine...", m_levelPath.toUtf8().data());
|
||||
// Switch the current directory back to the Primary CD folder first.
|
||||
// The engine might have trouble to find some files when the current
|
||||
|
||||
@@ -102,7 +102,6 @@ private:
|
||||
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
|
||||
bool m_bAutoExportMode;
|
||||
int m_numExportedMaterials;
|
||||
|
||||
static CGameExporter* m_pCurrentExporter;
|
||||
};
|
||||
|
||||
@@ -27,19 +27,6 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
// Object names in this array must correspond to EObject enumeration.
|
||||
const char* g_ObjectNames[eStatObject_COUNT] =
|
||||
{
|
||||
"Objects/Arrow.cgf",
|
||||
"Objects/Axis.cgf",
|
||||
"Objects/Sphere.cgf",
|
||||
"Objects/Anchor.cgf",
|
||||
"Objects/entrypoint.cgf",
|
||||
"Objects/hidepoint.cgf",
|
||||
"Objects/hidepoint_sec.cgf",
|
||||
"Objects/reinforcement_point.cgf",
|
||||
};
|
||||
|
||||
const char* g_IconNames[eIcon_COUNT] =
|
||||
{
|
||||
"Icons/ScaleWarning.png",
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Description : Calculate the reference frame for sub-object selections.
|
||||
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_INCLUDE_ISUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H
|
||||
#define CRYINCLUDE_EDITOR_INCLUDE_ISUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H
|
||||
#pragma once
|
||||
|
||||
|
||||
class ISubObjectSelectionReferenceFrameCalculator
|
||||
{
|
||||
public:
|
||||
virtual void SetExplicitFrame(bool bAnySelected, const Matrix34& refFrame) = 0;
|
||||
};
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_INCLUDE_ISUBOBJECTSELECTIONREFERENCEFRAMECALCULATOR_H
|
||||
@@ -183,7 +183,6 @@ void CLayoutWnd::MaximizeViewport(int paneId)
|
||||
|
||||
QString viewClass = m_viewType[paneId];
|
||||
|
||||
const QRect rc = rect();
|
||||
if (!m_bMaximized)
|
||||
{
|
||||
CLayoutViewPane* pViewPane = GetViewPane(paneId);
|
||||
|
||||
@@ -32,22 +32,6 @@ static const char lastLoadPathFilename[] = "lastLoadPath.preset";
|
||||
// Folder in which levels are stored
|
||||
static const char kLevelsFolder[] = "Levels";
|
||||
|
||||
// List of folder names that are used to detect a level folder
|
||||
static const char* kLevelFolderNames[] =
|
||||
{
|
||||
"Layers",
|
||||
"Minimap",
|
||||
"LevelData"
|
||||
};
|
||||
|
||||
// List of files that are used to detect a level folder
|
||||
static const char* kLevelFileNames[] =
|
||||
{
|
||||
"level.pak",
|
||||
"filelist.xml",
|
||||
"levelshadercache.pak",
|
||||
};
|
||||
|
||||
CLevelFileDialog::CLevelFileDialog(bool openDialog, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, m_bOpenDialog(openDialog)
|
||||
|
||||
@@ -64,7 +64,6 @@ private:
|
||||
QString m_fileName;
|
||||
QString m_filter;
|
||||
const bool m_bOpenDialog;
|
||||
bool m_initialized = false;
|
||||
LevelTreeModel* const m_model;
|
||||
LevelTreeModelFilter* const m_filterModel;
|
||||
};
|
||||
|
||||
@@ -179,19 +179,17 @@ void CLogFile::FormatLineV(const char * format, va_list argList)
|
||||
|
||||
void CLogFile::AboutSystem()
|
||||
{
|
||||
char szBuffer[MAX_LOGBUFFER_SIZE];
|
||||
wchar_t szBufferW[MAX_LOGBUFFER_SIZE];
|
||||
#if defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX)
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Write the system informations to the log
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
wchar_t szLanguageBufferW[64];
|
||||
char szBuffer[MAX_LOGBUFFER_SIZE];
|
||||
//wchar_t szCPUModel[64];
|
||||
MEMORYSTATUS MemoryStatus;
|
||||
#endif // defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX)
|
||||
|
||||
#if defined(AZ_PLATFORM_WINDOWS)
|
||||
wchar_t szLanguageBufferW[64];
|
||||
DEVMODE DisplayConfig;
|
||||
OSVERSIONINFO OSVerInfo;
|
||||
OSVerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
@@ -296,6 +294,7 @@ AZ_POP_DISABLE_WARNING
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
str += " (";
|
||||
wchar_t szBufferW[MAX_LOGBUFFER_SIZE];
|
||||
GetWindowsDirectoryW(szBufferW, sizeof(szBufferW));
|
||||
AZStd::to_string(szBuffer, MAX_LOGBUFFER_SIZE, szBufferW);
|
||||
str += szBuffer;
|
||||
|
||||
@@ -108,12 +108,6 @@ using namespace AzToolsFramework;
|
||||
#define LAYOUTS_WILDCARD "*.layout"
|
||||
#define DUMMY_LAYOUT_NAME "Dummy_Layout"
|
||||
|
||||
static const char* g_openViewPaneEventName = "OpenViewPaneEvent"; //Sent when users open view panes;
|
||||
static const char* g_viewPaneAttributeName = "ViewPaneName"; //Name of the current view pane
|
||||
static const char* g_openLocationAttributeName = "OpenLocation"; //Indicates where the current view pane is opened from
|
||||
|
||||
static const char* g_assetImporterName = "AssetImporter";
|
||||
|
||||
class CEditorOpenViewCommand
|
||||
: public _i_reference_target_t
|
||||
{
|
||||
@@ -303,7 +297,7 @@ MainWindow::MainWindow(QWidget* parent)
|
||||
, m_settings("O3DE", "O3DE")
|
||||
, m_toolbarManager(new ToolbarManager(m_actionManager, this))
|
||||
, m_assetImporterManager(new AssetImporterManager(this))
|
||||
, m_levelEditorMenuHandler(new LevelEditorMenuHandler(this, m_viewPaneManager, m_settings))
|
||||
, m_levelEditorMenuHandler(new LevelEditorMenuHandler(this, m_viewPaneManager))
|
||||
, m_sourceControlNotifHandler(new AzToolsFramework::QtSourceControlNotificationHandler(this))
|
||||
, m_viewPaneHost(nullptr)
|
||||
, m_autoSaveTimer(nullptr)
|
||||
|
||||
@@ -33,7 +33,6 @@ class CGizmo;
|
||||
class CObjectArchive;
|
||||
struct SSubObjSelectionModifyContext;
|
||||
struct SRayHitInfo;
|
||||
class ISubObjectSelectionReferenceFrameCalculator;
|
||||
class CPopupMenuItem;
|
||||
class QMenu;
|
||||
struct IRenderNode;
|
||||
@@ -571,7 +570,6 @@ public:
|
||||
// Return true if object support selecting of this sub object element type.
|
||||
virtual bool StartSubObjSelection([[maybe_unused]] int elemType) { return false; };
|
||||
virtual void EndSubObjectSelection() {};
|
||||
virtual void CalculateSubObjectSelectionReferenceFrame([[maybe_unused]] ISubObjectSelectionReferenceFrameCalculator* pCalculator) { };
|
||||
virtual void ModifySubObjSelection([[maybe_unused]] SSubObjSelectionModifyContext& modCtx) {};
|
||||
virtual void AcceptSubObjectModify() {};
|
||||
|
||||
|
||||
@@ -1555,11 +1555,8 @@ void CObjectManager::DeleteSelection()
|
||||
// Make sure to unlock selection.
|
||||
GetIEditor()->LockSelection(false);
|
||||
|
||||
GUID bID = GUID_NULL;
|
||||
|
||||
int i;
|
||||
CSelectionGroup objects;
|
||||
for (i = 0; i < m_currSelection->GetCount(); i++)
|
||||
for (int i = 0; i < m_currSelection->GetCount(); i++)
|
||||
{
|
||||
// Check condition(s) if object could be deleted
|
||||
if (!IsObjectDeletionAllowed(m_currSelection->GetObject(i)))
|
||||
@@ -2899,17 +2896,6 @@ namespace
|
||||
return AZ::Vector3(position.x, position.y, position.z);
|
||||
}
|
||||
|
||||
AZ::Vector3 PyGetWorldObjectPosition(const char* pName)
|
||||
{
|
||||
CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(pName);
|
||||
if (!pObject)
|
||||
{
|
||||
throw std::logic_error((QString("\"") + pName + "\" is an invalid object.").toUtf8().data());
|
||||
}
|
||||
Vec3 position = pObject->GetWorldPos();
|
||||
return AZ::Vector3(position.x, position.y, position.z);
|
||||
}
|
||||
|
||||
void PySetObjectPosition(const char* pName, float fValueX, float fValueY, float fValueZ)
|
||||
{
|
||||
CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(pName);
|
||||
|
||||
@@ -316,8 +316,6 @@ void CSelectionGroup::Rotate(const Ang3& angles, int referenceCoordSys)
|
||||
// return;
|
||||
|
||||
// Rotate selection about selection center.
|
||||
Vec3 center = GetCenter();
|
||||
|
||||
Matrix34 rotateTM = Matrix34::CreateRotationXYZ(DEG2RAD(angles));
|
||||
Rotate(rotateTM, referenceCoordSys);
|
||||
}
|
||||
|
||||
@@ -27,9 +27,11 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#define AXIS_SIZE 0.1f
|
||||
|
||||
#if 0
|
||||
namespace {
|
||||
int s_highlightAxis = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CTrackGizmo::CTrackGizmo()
|
||||
@@ -175,13 +177,11 @@ void CTrackGizmo::DrawAxis(DisplayContext& dc, const Vec3& org)
|
||||
y = y * fScreenScale;
|
||||
z = z * fScreenScale;
|
||||
|
||||
float col[4] = { 1, 1, 1, 1 };
|
||||
float hcol[4] = { 1, 0, 0, 1 };
|
||||
Vec3 colX(1, 0, 0), colY(0, 1, 0), colZ(0, 0, 1);
|
||||
|
||||
AZ_ErrorOnce(nullptr, false, "CTrackGizmo::DrawAxis needs to be removed/ported to use Atom");
|
||||
#if 0
|
||||
|
||||
float col[4] = { 1, 1, 1, 1 };
|
||||
dc.renderer->DrawLabelEx(org + x, 1.2f, col, true, true, "X");
|
||||
dc.renderer->DrawLabelEx(org + y, 1.2f, col, true, true, "Y");
|
||||
dc.renderer->DrawLabelEx(org + z, 1.2f, col, true, true, "Z");
|
||||
|
||||
@@ -66,8 +66,8 @@ int main(int argc, char* argv[])
|
||||
processLaunchInfo.m_environmentVariables = &envVars;
|
||||
processLaunchInfo.m_showWindow = true;
|
||||
|
||||
AzFramework::ProcessWatcher* processWatcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE);
|
||||
|
||||
AZStd::unique_ptr<AzFramework::ProcessWatcher> processWatcher(AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE));
|
||||
|
||||
application.Destroy();
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -50,11 +50,6 @@
|
||||
* Scalars for icon drawing behavior.
|
||||
*/
|
||||
static const int s_kIconSize = 36; /// Icon display size (in pixels)
|
||||
static const float s_kIconMaxWorldDist = 200.f; /// Icons are culled past this range
|
||||
static const float s_kIconMinScale = 0.1f; /// Minimum scale for icons in the distance
|
||||
static const float s_kIconMaxScale = 1.0f; /// Maximum scale for icons near the camera
|
||||
static const float s_kIconCloseDist = 3.f; /// Distance at which icons are at maximum scale
|
||||
static const float s_kIconFarDist = 40.f; /// Distance at which icons are at minimum scale
|
||||
|
||||
CComponentEntityObject::CComponentEntityObject()
|
||||
: m_hasIcon(false)
|
||||
|
||||
@@ -528,7 +528,6 @@ void SandboxIntegrationManager::EntityParentChanged(
|
||||
oldAncestor = nextParentId;
|
||||
} while (oldAncestor.IsValid());
|
||||
|
||||
AZ::EntityId newAncestors = newParentId;
|
||||
AZ::EntityId newAncestor = newParentId;
|
||||
|
||||
bool isGoingToRootScene = false;
|
||||
@@ -721,7 +720,7 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con
|
||||
if (selected.size() > 0)
|
||||
{
|
||||
action = menu->addAction(QObject::tr("Find in Entity Outliner"));
|
||||
QObject::connect(action, &QAction::triggered, [this, selected]
|
||||
QObject::connect(action, &QAction::triggered, [selected]
|
||||
{
|
||||
AzToolsFramework::EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::OnFocusInEntityOutliner, selected);
|
||||
});
|
||||
@@ -842,7 +841,7 @@ void SandboxIntegrationManager::SetupLayerContextMenu(QMenu* menu)
|
||||
|
||||
QAction* findLayerAssetAction = menu->addAction(QObject::tr("Find layer in Asset Browser"));
|
||||
findLayerAssetAction->setToolTip(QObject::tr("Selects this layer in the Asset Browser"));
|
||||
QObject::connect(findLayerAssetAction, &QAction::triggered, [this, fullFilePath] {
|
||||
QObject::connect(findLayerAssetAction, &QAction::triggered, [fullFilePath] {
|
||||
QtViewPaneManager::instance()->OpenPane(LyViewPane::AssetBrowser);
|
||||
|
||||
AzToolsFramework::AssetBrowser::AssetBrowserViewRequestBus::Broadcast(
|
||||
|
||||
@@ -280,7 +280,6 @@ private:
|
||||
|
||||
private:
|
||||
AZ::Vector2 m_contextMenuViewPoint;
|
||||
AZ::Vector3 m_sliceWorldPos;
|
||||
|
||||
int m_inObjectPickMode;
|
||||
short m_startedUndoRecordingNestingLevel; // used in OnBegin/EndUndo to ensure we only accept undo's we started recording
|
||||
@@ -298,8 +297,6 @@ private:
|
||||
const AZStd::string m_defaultComponentViewportIconLocation = "Icons/Components/Viewport/Component_Placeholder.svg";
|
||||
const AZStd::string m_defaultEntityIconLocation = "Icons/Components/Viewport/Transform.svg";
|
||||
|
||||
bool m_debugDisplayBusImplementationActive = false;
|
||||
|
||||
AzToolsFramework::Prefab::PrefabIntegrationManager* m_prefabIntegrationManager = nullptr;
|
||||
|
||||
AzToolsFramework::EditorEntityUiInterface* m_editorEntityUiInterface = nullptr;
|
||||
|
||||
@@ -1234,8 +1234,6 @@ bool OutlinerListModel::ReparentEntities(const AZ::EntityId& newParentId, const
|
||||
QMimeData* OutlinerListModel::mimeData(const QModelIndexList& indexes) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
AZ::TypeId uuid1 = AZ::AzTypeInfo<AZ::Entity>::Uuid();
|
||||
AZ::TypeId uuid2 = AZ::AzTypeInfo<AzToolsFramework::EditorEntityIdContainer>::Uuid();
|
||||
|
||||
AzToolsFramework::EditorEntityIdContainer entityIdList;
|
||||
for (const QModelIndex& index : indexes)
|
||||
@@ -1462,13 +1460,11 @@ void OutlinerListModel::OnEntityRuntimeActivationChanged(AZ::EntityId entityId,
|
||||
QueueEntityUpdate(entityId);
|
||||
}
|
||||
|
||||
void OutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin(AZ::EntityId parentId, AZ::EntityId childId)
|
||||
void OutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin([[maybe_unused]] AZ::EntityId parentId, [[maybe_unused]] AZ::EntityId childId)
|
||||
{
|
||||
//add/remove operations trigger selection change signals which assert and break undo/redo operations in progress in inspector etc.
|
||||
//so disallow selection updates until change is complete
|
||||
emit EnableSelectionUpdates(false);
|
||||
auto parentIndex = GetIndexFromEntity(parentId);
|
||||
auto childIndex = GetIndexFromEntity(childId);
|
||||
beginResetModel();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,18 +33,6 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
const char* PyGetCVar(const char* pName)
|
||||
{
|
||||
ICVar* pCVar = GetIEditor()->GetSystem()->GetIConsole()->GetCVar(pName);
|
||||
if (!pCVar)
|
||||
{
|
||||
Warning("PyGetCVar: Attempt to access non-existent CVar '%s'", pName ? pName : "(null)");
|
||||
throw std::logic_error((QString("\"") + pName + "\" is an invalid cvar.").toUtf8().data());
|
||||
}
|
||||
return pCVar->GetString();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
const char* PyGetCVarAsString(const char* pName)
|
||||
{
|
||||
@@ -212,52 +200,6 @@ namespace
|
||||
return GetIEditor()->IsInSimulationMode();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
QString PyNewObject(const char* typeName, const char* fileName, const char* name, float x, float y, float z)
|
||||
{
|
||||
CBaseObject* object = GetIEditor()->NewObject(typeName, fileName, name, x, y, z);
|
||||
if (object)
|
||||
{
|
||||
return object->GetName();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
QString PyNewObjectAtCursor(const char* typeName, const char* fileName, const char* name)
|
||||
{
|
||||
CUndo undo("Create new object");
|
||||
|
||||
Vec3 pos(0, 0, 0);
|
||||
|
||||
QPoint p = QCursor::pos();
|
||||
CViewport* viewport = GetIEditor()->GetViewManager()->GetViewportAtPoint(p);
|
||||
if (viewport)
|
||||
{
|
||||
viewport->ScreenToClient(p);
|
||||
if (GetIEditor()->GetAxisConstrains() != AXIS_TERRAIN)
|
||||
{
|
||||
pos = viewport->MapViewToCP(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Snap to terrain.
|
||||
bool hitTerrain;
|
||||
pos = viewport->ViewToWorld(p, &hitTerrain);
|
||||
if (hitTerrain)
|
||||
{
|
||||
pos.z = GetIEditor()->GetTerrainElevation(pos.x, pos.y) + 1.0f;
|
||||
}
|
||||
pos = viewport->SnapToGrid(pos);
|
||||
}
|
||||
}
|
||||
|
||||
return PyNewObject(typeName, fileName, name, pos.x, pos.y, pos.z);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void PyRunConsole(const char* text)
|
||||
{
|
||||
|
||||
@@ -240,14 +240,13 @@ static bool SkipTitleBarOverdraw(QtViewPane* pane)
|
||||
return !pane->m_options.isDockable;
|
||||
}
|
||||
|
||||
DockWidget::DockWidget(QWidget* widget, QtViewPane* pane, QSettings* settings, QMainWindow* parent, AzQtComponents::FancyDocking* advancedDockManager)
|
||||
DockWidget::DockWidget(QWidget* widget, QtViewPane* pane, [[maybe_unused]] QSettings* settings, QMainWindow* parent, AzQtComponents::FancyDocking* advancedDockManager)
|
||||
: AzQtComponents::StyledDockWidget(pane->m_name, SkipTitleBarOverdraw(pane),
|
||||
#if AZ_TRAIT_OS_PLATFORM_APPLE
|
||||
pane->m_options.detachedWindow ? nullptr : parent)
|
||||
#else
|
||||
parent)
|
||||
#endif
|
||||
, m_settings(settings)
|
||||
, m_mainWindow(parent)
|
||||
, m_pane(pane)
|
||||
, m_advancedDockManager(advancedDockManager)
|
||||
|
||||
@@ -67,7 +67,6 @@ private:
|
||||
void reparentToMainWindowFix();
|
||||
QRect ProperGeometry() const;
|
||||
QString settingsKey() const;
|
||||
QSettings* const m_settings;
|
||||
QMainWindow* const m_mainWindow;
|
||||
QtViewPane* const m_pane;
|
||||
AzQtComponents::FancyDocking* m_advancedDockManager;
|
||||
|
||||
@@ -191,7 +191,6 @@ void CAxisHelper::DrawAxis(const Matrix34& worldTM, const SGizmoParameters& setu
|
||||
{
|
||||
if (axis)
|
||||
{
|
||||
float col[4] = { 1, 0, 0, 1 };
|
||||
if (axis == AXIS_X || axis == AXIS_XY || axis == AXIS_XZ || axis == AXIS_XYZ)
|
||||
{
|
||||
colX = colSelected;
|
||||
@@ -436,7 +435,6 @@ void CAxisHelper::DrawAxis(const Matrix34& worldTM, const SGizmoParameters& setu
|
||||
{
|
||||
dc.SetColor(QColor(128, 32, 32), 0.4f);
|
||||
}
|
||||
Vec3 org = worldTM.GetTranslation();
|
||||
dc.DrawBall(Vec3(0.0f), m_size * kSelectionBallScale);
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace SandboxEditor
|
||||
|
||||
void StartupTraceHandler::ShowMessageBox(const QString& message)
|
||||
{
|
||||
AZ::SystemTickBus::QueueFunction([this, message]()
|
||||
AZ::SystemTickBus::QueueFunction([message]()
|
||||
{
|
||||
// Parent to the main window, so that the error dialog doesn't
|
||||
// show up as a separate window when alt-tabbing.
|
||||
|
||||
@@ -1217,7 +1217,6 @@ void EditableQToolBar::dropEvent(QDropEvent* ev)
|
||||
return;
|
||||
}
|
||||
|
||||
const int actionId = action->data().toInt();
|
||||
QWidget* beforeWidget = insertPositionForDrop(ev->pos());
|
||||
QAction* beforeAction = beforeWidget ? ActionForWidget(beforeWidget) : nullptr;
|
||||
|
||||
|
||||
@@ -39,8 +39,6 @@ namespace
|
||||
QColor COLOR_FOR_CONSOLE_COMMAND = QColor(0, 0, 255);
|
||||
QColor COLOR_FOR_TOGGLE_COMMAND = QColor(128, 0, 255);
|
||||
QColor COLOR_FOR_INVALID_COMMAND = QColor(255, 0, 0);
|
||||
|
||||
UINT CONSOLE_CMD_DROP_LIST_HEIGHT = 300;
|
||||
};
|
||||
|
||||
class IconListModel
|
||||
|
||||
@@ -26,27 +26,6 @@
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_BGRA 0x80E1
|
||||
|
||||
// Used to give each static object type a different color
|
||||
static uint32 sVegetationColors[16] =
|
||||
{
|
||||
0xFFFF0000,
|
||||
0xFF00FF00,
|
||||
0xFF0000FF,
|
||||
0xFFFFFFFF,
|
||||
0xFFFF00FF,
|
||||
0xFFFFFF00,
|
||||
0xFF00FFFF,
|
||||
0xFF7F00FF,
|
||||
0xFF7FFF7F,
|
||||
0xFFFF7F00,
|
||||
0xFF00FF7F,
|
||||
0xFF7F7F7F,
|
||||
0xFFFF0000,
|
||||
0xFF00FF00,
|
||||
0xFF0000FF,
|
||||
0xFFFFFFFF,
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -19,10 +19,8 @@
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
CDirectorNodeAnimator::CDirectorNodeAnimator(CTrackViewAnimNode* pDirectorNode)
|
||||
: m_pDirectorNode(pDirectorNode)
|
||||
CDirectorNodeAnimator::CDirectorNodeAnimator([[maybe_unused]] CTrackViewAnimNode* pDirectorNode)
|
||||
{
|
||||
assert(m_pDirectorNode != nullptr);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -139,7 +137,6 @@ void CDirectorNodeAnimator::ForEachActiveSequence(const SAnimContext& ac, CTrack
|
||||
const bool bHandleOtherKeys, std::function<void(CTrackViewSequence*, const SAnimContext&)> animateFunction,
|
||||
std::function<void(CTrackViewSequence*, const SAnimContext&)> resetFunction)
|
||||
{
|
||||
const float time = ac.time;
|
||||
const unsigned int numKeys = pSequenceTrack->GetKeyCount();
|
||||
|
||||
if (bHandleOtherKeys)
|
||||
|
||||
@@ -34,7 +34,5 @@ private:
|
||||
void ForEachActiveSequence(const SAnimContext& ac, CTrackViewTrack* pSequenceTrack,
|
||||
const bool bHandleOtherKeys, std::function<void(CTrackViewSequence*, const SAnimContext&)> animateFunction,
|
||||
std::function<void(CTrackViewSequence*, const SAnimContext&)> resetFunction);
|
||||
|
||||
CTrackViewAnimNode* m_pDirectorNode;
|
||||
};
|
||||
#endif // CRYINCLUDE_EDITOR_TRACKVIEW_DIRECTORNODEANIMATOR_H
|
||||
|
||||
@@ -106,7 +106,6 @@ namespace
|
||||
{ AnimParamType::User, "Muted", QColor(255, 224, 224) },
|
||||
};
|
||||
|
||||
const int kButtonsIdBase = 0x7fff;
|
||||
const int kMaxRows = 20;
|
||||
const int kColumnWidth = 300;
|
||||
const int kRowHeight = 24;
|
||||
|
||||
@@ -29,12 +29,6 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
|
||||
// CTVEventsDialog dialog
|
||||
|
||||
namespace
|
||||
{
|
||||
const int kCountSubItemIndex = 1;
|
||||
const int kTimeSubItemIndex = 2;
|
||||
}
|
||||
|
||||
class TVEventsModel
|
||||
: public QAbstractTableModel
|
||||
{
|
||||
|
||||
@@ -1819,7 +1819,6 @@ bool CTrackViewAnimNode::IsDisabled() const
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewAnimNode::SetPos(const Vec3& position)
|
||||
{
|
||||
const float time = GetSequence()->GetTime();
|
||||
CTrackViewTrack* track = GetTrackForParameter(AnimParamType::Position);
|
||||
|
||||
if (track)
|
||||
|
||||
@@ -77,9 +77,6 @@ inline namespace TrackViewInternal
|
||||
const int s_kMinimumFrameSnappingFPS = 1;
|
||||
const int s_kMaximumFrameSnappingFPS = 120;
|
||||
|
||||
const int TRACKVIEW_LAYOUT_VERSION = 0x0001; // Bump this up on every substantial pane layout change
|
||||
const int TRACKVIEW_REBAR_VERSION = 0x0002; // Bump this up on every substantial rebar change
|
||||
|
||||
CTrackViewSequence* GetSequenceByEntityIdOrName(const CTrackViewSequenceManager* pSequenceManager, const char* entityIdOrName)
|
||||
{
|
||||
// the "name" string will be an AZ::EntityId in string form if this was called from
|
||||
|
||||
@@ -199,7 +199,6 @@ void CTrackViewDopeSheetBase::SetTimeRange(float start, float end)
|
||||
void CTrackViewDopeSheetBase::SetTimeScale(float timeScale, float fAnchorTime)
|
||||
{
|
||||
const double fOldOffset = -fAnchorTime * m_timeScale;
|
||||
const double fOldScale = m_timeScale;
|
||||
|
||||
timeScale = std::max(timeScale, 0.001f);
|
||||
timeScale = std::min(timeScale, 100000.0f);
|
||||
@@ -1426,8 +1425,6 @@ void CTrackViewDopeSheetBase::OnCaptureChanged()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CTrackViewDopeSheetBase::IsOkToAddKeyHere(const CTrackViewTrack* pTrack, float time) const
|
||||
{
|
||||
const float timeEpsilon = 0.05f;
|
||||
|
||||
for (unsigned int i = 0; i < pTrack->GetKeyCount(); ++i)
|
||||
{
|
||||
const CTrackViewKeyConstHandle& keyHandle = pTrack->GetKey(i);
|
||||
@@ -2152,8 +2149,6 @@ void CTrackViewDopeSheetBase::AcceptUndo()
|
||||
{
|
||||
if (CUndo::IsRecording())
|
||||
{
|
||||
const QPoint mousePos = mapFromGlobal(QCursor::pos());
|
||||
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
|
||||
if (m_mouseMode == eTVMouseMode_Paste)
|
||||
@@ -2623,7 +2618,6 @@ void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* pa
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
QRect trackRect;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_visibilityBrush);
|
||||
@@ -2752,7 +2746,6 @@ void CTrackViewDopeSheetBase::DrawKeys(CTrackViewTrack* pTrack, QPainter* painte
|
||||
}
|
||||
|
||||
int x1 = x + kDefaultWidthForDescription;
|
||||
CTrackViewKeyHandle nextKey = keyHandle.GetNextKey();
|
||||
|
||||
int nextKeyIndex = i + 1;
|
||||
|
||||
|
||||
@@ -22,16 +22,12 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewKeyConstHandle::GetKey(IKey* pKey) const
|
||||
{
|
||||
assert(m_bIsValid);
|
||||
|
||||
m_pTrack->GetKey(m_keyIndex, pKey);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
float CTrackViewKeyConstHandle::GetTime() const
|
||||
{
|
||||
assert(m_bIsValid);
|
||||
|
||||
return m_pTrack->GetKeyTime(m_keyIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,13 +22,11 @@ class CTrackViewKeyConstHandle
|
||||
{
|
||||
public:
|
||||
CTrackViewKeyConstHandle()
|
||||
: m_bIsValid(false)
|
||||
, m_keyIndex(0)
|
||||
: m_keyIndex(0)
|
||||
, m_pTrack(nullptr) {}
|
||||
|
||||
CTrackViewKeyConstHandle(const CTrackViewTrack* pTrack, unsigned int keyIndex)
|
||||
: m_bIsValid(true)
|
||||
, m_keyIndex(keyIndex)
|
||||
: m_keyIndex(keyIndex)
|
||||
, m_pTrack(pTrack) {}
|
||||
|
||||
void GetKey(IKey* pKey) const;
|
||||
@@ -36,7 +34,6 @@ public:
|
||||
const CTrackViewTrack* GetTrack() const { return m_pTrack; }
|
||||
|
||||
private:
|
||||
bool m_bIsValid;
|
||||
unsigned int m_keyIndex;
|
||||
const CTrackViewTrack* m_pTrack;
|
||||
};
|
||||
|
||||
@@ -202,7 +202,6 @@ private:
|
||||
|
||||
// Drag and drop
|
||||
CTrackViewAnimNodeBundle m_draggedNodes;
|
||||
CTrackViewAnimNode* m_pDragTarget;
|
||||
|
||||
std::unordered_map<unsigned int, CAnimParamType> m_menuParamTypeMap;
|
||||
std::unordered_map<const CTrackViewNode*, CRecord*> m_nodeToRecordMap;
|
||||
|
||||
@@ -135,9 +135,7 @@ CTrackViewKeyHandle CTrackViewSequence::FindSingleSelectedKey()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewSequence::OnEntityComponentPropertyChanged(AZ::ComponentId changedComponentId)
|
||||
{
|
||||
const AZ::EntityId entityId = *AzToolsFramework::PropertyEditorEntityChangeNotificationBus::GetCurrentBusId();
|
||||
|
||||
{
|
||||
// find the component node for this changeComponentId if it exists
|
||||
for (int i = m_pAnimSequence->GetNodeCount(); --i >= 0;)
|
||||
{
|
||||
|
||||
@@ -611,7 +611,6 @@ void CTrackViewSplineCtrl::mouseMoveEvent(QMouseEvent* event)
|
||||
|
||||
CTrackViewSequenceNotificationContext context(pSequence);
|
||||
|
||||
QPoint cMousePosPrev = m_cMousePos;
|
||||
m_cMousePos = point;
|
||||
|
||||
if (m_editMode == NothingMode)
|
||||
|
||||
@@ -71,7 +71,6 @@ private:
|
||||
ColumnGroupHeaderView* m_header;
|
||||
ColumnGroupProxyModel* m_groupModel;
|
||||
QSet<QString> m_openNodes;
|
||||
bool m_showGroups;
|
||||
};
|
||||
|
||||
#endif // COLUMNGROUPTREEVIEW_H
|
||||
|
||||
@@ -178,7 +178,6 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void GetSubImage(int x1, int y1, int width, int height, TImage<T>& img) const
|
||||
{
|
||||
int size = width * height;
|
||||
img.Allocate(width, height);
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
|
||||
@@ -99,7 +99,7 @@ bool CImageASC::Load(const QString& fileName, CFloatImage& image)
|
||||
|
||||
// Break all of the values in the file apart into tokens.
|
||||
|
||||
char* nextToken = nullptr;
|
||||
[[maybe_unused]] char* nextToken = nullptr;
|
||||
token = azstrtok(str, 0, seps, &nextToken);
|
||||
|
||||
// ncols = grid width
|
||||
|
||||
@@ -76,8 +76,6 @@ static int numused;
|
||||
const char* id87 = "GIF87a";
|
||||
const char* id89 = "GIF89a";
|
||||
|
||||
static int log2 (int);
|
||||
|
||||
/* Fetch the next code from the raster data stream. The codes can be
|
||||
* any length from 3 to 12 bits, packed into 8-bit bytes, so we have to
|
||||
* maintain our location in the Raster array as a BIT Offset. We compute
|
||||
|
||||
@@ -145,7 +145,7 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
char* str = new char[fileSize];
|
||||
fread(str, fileSize, 1, file);
|
||||
|
||||
char* nextToken = nullptr;
|
||||
[[maybe_unused]] char* nextToken = nullptr;
|
||||
token = azstrtok(str, 0, seps, &nextToken);
|
||||
|
||||
while (token != nullptr && token[0] == '#')
|
||||
|
||||
@@ -118,7 +118,6 @@ private:
|
||||
|
||||
int m_id;
|
||||
int m_nBorder;
|
||||
int m_titleHeight;
|
||||
|
||||
QWidget* m_viewport;
|
||||
QScrollArea* m_viewportScrollArea = nullptr;
|
||||
|
||||
@@ -290,7 +290,6 @@ set(FILES
|
||||
Include/IPreferencesPage.h
|
||||
Include/IRenderListener.h
|
||||
Include/ISourceControl.h
|
||||
Include/ISubObjectSelectionReferenceFrameCalculator.h
|
||||
Include/ITextureDatabaseUpdater.h
|
||||
Include/ITransformManipulator.h
|
||||
Include/IViewPane.h
|
||||
@@ -460,8 +459,6 @@ set(FILES
|
||||
Dialogs/PythonScriptsDialog.ui
|
||||
Dialogs/Generic/UserOptions.cpp
|
||||
Dialogs/Generic/UserOptions.h
|
||||
EditMode/SubObjectSelectionReferenceFrameCalculator.cpp
|
||||
EditMode/SubObjectSelectionReferenceFrameCalculator.h
|
||||
Export/ExportManager.cpp
|
||||
Export/ExportManager.h
|
||||
Export/OBJExporter.cpp
|
||||
|
||||
@@ -324,7 +324,7 @@ namespace UnitTest
|
||||
|
||||
// Tests whether the deleter actually calls delete properly without
|
||||
// a parent database.
|
||||
instance->m_onDeleteCallback = [this, &m_deleted]()
|
||||
instance->m_onDeleteCallback = [&m_deleted]()
|
||||
{
|
||||
m_deleted = true;
|
||||
};
|
||||
|
||||
@@ -1266,7 +1266,7 @@ namespace AZ
|
||||
void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override
|
||||
{
|
||||
// Remove last path segment and check if the key corresponds to the Modules array
|
||||
AZStd::optional<AZStd::string_view> moduleIndex = AZ::StringFunc::TokenizeLast(path, "/");
|
||||
AZ::StringFunc::TokenizeLast(path, "/");
|
||||
if (path.ends_with("/Modules"))
|
||||
{
|
||||
// Remove the "Modules" path segment to be at the GemName key
|
||||
|
||||
@@ -94,12 +94,9 @@ namespace AZ
|
||||
result.Combine(componentLoadResult);
|
||||
}
|
||||
|
||||
{
|
||||
JSR::ResultCode runtimeActiveLoadResult =
|
||||
ContinueLoadingFromJsonObjectField(&entityInstance->m_isRuntimeActiveByDefault,
|
||||
azrtti_typeid<decltype(entityInstance->m_isRuntimeActiveByDefault)>(),
|
||||
inputValue, "IsRuntimeActive", context);
|
||||
}
|
||||
ContinueLoadingFromJsonObjectField(&entityInstance->m_isRuntimeActiveByDefault,
|
||||
azrtti_typeid<decltype(entityInstance->m_isRuntimeActiveByDefault)>(),
|
||||
inputValue, "IsRuntimeActive", context);
|
||||
|
||||
return context.Report(
|
||||
result,
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace AZ
|
||||
|
||||
AZStd::fixed_vector<TypeId, 64> knownBaseClasses = { typeToExamine }; // avoid allocating heap here if possible. 64 types are 64*sizeof(Uuid) which is only 1k.
|
||||
bool foundBaseClass = false;
|
||||
auto enumerateBaseVisitor = [&foundBaseClass, &baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId)
|
||||
auto enumerateBaseVisitor = [&baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId)
|
||||
{
|
||||
if (!classData)
|
||||
{
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
namespace AZ::Debug
|
||||
{
|
||||
constexpr static const char* BudgetTrackerEnvName = "budgetTrackerEnv";
|
||||
|
||||
struct BudgetTracker::BudgetTrackerImpl
|
||||
{
|
||||
AZStd::unordered_map<const char*, Budget> m_budgets;
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace AZ
|
||||
const u32 Timestamp = AZ_CRC("Timestamp", 0xa5d6e63e);
|
||||
const u32 Duration = AZ_CRC("Duration", 0x865f80c0);
|
||||
const u32 Instant = AZ_CRC("Instant", 0x0e9047ad);
|
||||
const u32 InstantScope = AZ_CRC("InstantScope", 0xed4bfb0e);
|
||||
}
|
||||
|
||||
EventTraceDriller::EventTraceDriller()
|
||||
|
||||
@@ -66,7 +66,6 @@ namespace AZ
|
||||
static const int assertLevel_log = 1;
|
||||
static const int assertLevel_nativeUI = 2;
|
||||
static const int assertLevel_crash = 3;
|
||||
static const int logLevel_errorWarning = 1;
|
||||
static const int logLevel_full = 2;
|
||||
static AZ::EnvironmentVariable<AZStd::unordered_set<size_t>> g_ignoredAsserts;
|
||||
static AZ::EnvironmentVariable<int> g_assertVerbosityLevel;
|
||||
|
||||
@@ -12,23 +12,16 @@
|
||||
#define GUID_FORMAT_DATA1 "lX"
|
||||
#else
|
||||
#define GUID_DEFINED
|
||||
typedef struct _GUID {
|
||||
_GUID(unsigned long d1, unsigned short d2, unsigned short d3, std::initializer_list<unsigned char> d4)
|
||||
: Data1(d1),
|
||||
Data2(d2),
|
||||
Data3(d3)
|
||||
{
|
||||
for (auto it = d4.begin(); it != d4.end(); ++it)
|
||||
Data4[it - d4.begin()] = *it;
|
||||
}
|
||||
|
||||
_GUID() = default;
|
||||
#include <AzCore/std/containers/array.h>
|
||||
|
||||
struct _GUID {
|
||||
uint32_t Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[ 8 ];
|
||||
} GUID;
|
||||
AZStd::array<unsigned char,8> Data4;
|
||||
};
|
||||
using GUID = _GUID;
|
||||
#define GUID_FORMAT_DATA1 "X"
|
||||
#endif // GUID_DEFINED
|
||||
|
||||
@@ -39,7 +32,7 @@ static bool inline operator==(const _GUID& lhs, const _GUID& rhs)
|
||||
return lhs.Data1 == rhs.Data1 &&
|
||||
lhs.Data2 == rhs.Data2 &&
|
||||
lhs.Data3 == rhs.Data3 &&
|
||||
memcmp(lhs.Data4, rhs.Data4, 8) == 0;
|
||||
lhs.Data4 == rhs.Data4;
|
||||
}
|
||||
static bool inline operator!=(const _GUID& lhs, const _GUID& rhs)
|
||||
{
|
||||
@@ -69,10 +62,9 @@ typedef const GUID& REFIID;
|
||||
const GUID name \
|
||||
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
|
||||
static REFGUID GUID_NULL()
|
||||
inline constexpr GUID GUID_NULL()
|
||||
{
|
||||
static const GUID guid = { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
|
||||
return guid;
|
||||
return { 0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
|
||||
}
|
||||
|
||||
#define GUID_NULL GUID_NULL()
|
||||
|
||||
@@ -339,7 +339,6 @@ namespace AZ
|
||||
{
|
||||
const typename VecType::FloatType x_eq_0 = VecType::CmpEq(x, VecType::ZeroFloat());
|
||||
const typename VecType::FloatType x_ge_0 = VecType::CmpGtEq(x, VecType::ZeroFloat());
|
||||
const typename VecType::FloatType x_le_0 = VecType::CmpLtEq(x, VecType::ZeroFloat());
|
||||
const typename VecType::FloatType x_lt_0 = VecType::CmpLt(x, VecType::ZeroFloat());
|
||||
|
||||
const typename VecType::FloatType y_eq_0 = VecType::CmpEq(y, VecType::ZeroFloat());
|
||||
@@ -363,7 +362,6 @@ namespace AZ
|
||||
typename VecType::FloatType swap_sign_mask_offset = VecType::And(x_lt_0, y_lt_0);
|
||||
swap_sign_mask_offset = VecType::And(swap_sign_mask_offset, VecType::CastToFloat(FastLoadConstant<VecType>(Simd::g_negateMask)));
|
||||
|
||||
const typename VecType::FloatType offset0 = VecType::ZeroFloat();
|
||||
typename VecType::FloatType offset1 = FastLoadConstant<VecType>(g_Pi);
|
||||
offset1 = VecType::Xor(offset1, swap_sign_mask_offset);
|
||||
|
||||
|
||||
@@ -867,7 +867,6 @@ namespace AZ
|
||||
const FloatType cols0 = {{ rows[0].v[0], rows[1].v[0], rows[2].v[0], 0.0f }};
|
||||
const FloatType cols1 = {{ rows[0].v[1], rows[1].v[1], rows[2].v[1], 0.0f }};
|
||||
const FloatType cols2 = {{ rows[0].v[2], rows[1].v[2], rows[2].v[2], 0.0f }};
|
||||
const FloatType cols3 = {{ rows[0].v[3], rows[1].v[3], rows[2].v[3], 1.0f }};
|
||||
out[0] = cols0;
|
||||
out[1] = cols1;
|
||||
out[2] = cols2;
|
||||
|
||||
@@ -20,9 +20,7 @@ namespace AZ
|
||||
public:
|
||||
void ActivateAllocators()
|
||||
{
|
||||
// Note the parameter pack expansion, this creates the equivalent of a fold expression
|
||||
// For each type, call InitAllocator<T>(), then put 0 in the initializer list
|
||||
std::initializer_list<int> init{(InitAllocator<Allocators>(), 0)...};
|
||||
(InitAllocator<Allocators>(), ...);
|
||||
}
|
||||
|
||||
void DeactivateAllocators()
|
||||
|
||||
@@ -3774,8 +3774,7 @@ namespace AZ
|
||||
template<class... Functions>
|
||||
inline void OnDemandReflectFunctions(OnDemandReflectionOwner* onDemandReflection, AZStd::Internal::pack_traits_arg_sequence<Functions...>)
|
||||
{
|
||||
using PackExpander = bool[];
|
||||
PackExpander{ true, (BehaviorOnDemandReflectHelper<typename AZStd::function_traits<Functions>::raw_fp_type>::QueueReflect(onDemandReflection), true)... };
|
||||
(BehaviorOnDemandReflectHelper<typename AZStd::function_traits<Functions>::raw_fp_type>::QueueReflect(onDemandReflection), ...);
|
||||
}
|
||||
|
||||
// Assumes parameters array is big enough to store all parameters
|
||||
|
||||
@@ -493,7 +493,7 @@ namespace AZ
|
||||
const void* result = GetTypeId() == asType ? instance : nullptr;
|
||||
|
||||
using dummy = bool[];
|
||||
dummy{ true, (CastInternal<TArgs>(result, instance, asType), true)... };
|
||||
[[maybe_unused]] dummy d { true, (CastInternal<TArgs>(result, instance, asType), true)... };
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ namespace AZ
|
||||
bool result = GetTypeId() == id;
|
||||
|
||||
using dummy = bool[];
|
||||
dummy{ true, (IsTypeOfInternal<TArgs>(result, id), true)... };
|
||||
[[maybe_unused]] dummy d = { true, (IsTypeOfInternal<TArgs>(result, id), true)... };
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -534,7 +534,7 @@ namespace AZ
|
||||
callback(GetActualUuid(instance), instance);
|
||||
|
||||
using dummy = bool[];
|
||||
dummy{ true, (RttiHelper<TArgs>{}.EnumHierarchy(callback, instance), true)... };
|
||||
[[maybe_unused]] dummy d = { true, (RttiHelper<TArgs>{}.EnumHierarchy(callback, instance), true)... };
|
||||
}
|
||||
TypeTraits GetTypeTraits() const override
|
||||
{
|
||||
|
||||
@@ -1320,7 +1320,7 @@ namespace AZ
|
||||
(void)classElement;
|
||||
void* reserveElement{};
|
||||
using DummyArray = bool[];
|
||||
DummyArray{ true, (ReserveElementTuple<Indices>(tupleRef, classElement, reserveElement))... };
|
||||
[[maybe_unused]] DummyArray dummy = { true, (ReserveElementTuple<Indices>(tupleRef, classElement, reserveElement))... };
|
||||
return reserveElement;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,6 @@ namespace AZ
|
||||
AZStd::list<SerializeContext::ClassElement> m_dynamicClassElements; ///< Storage for class elements that represent dynamic serializable fields.
|
||||
};
|
||||
|
||||
static bool ConvertLegacyBoolToEnum(AZ::SerializeContext& context, AZStd::any& patchAny, const DataNode& sourceNode);
|
||||
static void ReportDataPatchMismatch(SerializeContext* context, const SerializeContext::ClassElement* classElement, const TypeId& patchDataTypeId);
|
||||
|
||||
//=========================================================================
|
||||
|
||||
@@ -161,7 +161,6 @@ namespace AZ
|
||||
using namespace JsonSerializationResult;
|
||||
|
||||
StoreTypeId storeTypeId = StoreTypeId::No;
|
||||
Uuid resolvedTypeId = classData.m_typeId;
|
||||
const SerializeContext::ClassData* resolvedClassData = &classData;
|
||||
AZStd::any defaultPointerObject;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace AZ
|
||||
static const char* FileType = "JsonSerialization";
|
||||
static const char* VersionTag = "Version";
|
||||
static const char* ClassNameTag = "ClassName";
|
||||
static const char* ClassIdTag = "ClassId";
|
||||
static const char* ClassDataTag = "ClassData";
|
||||
|
||||
AZ::Outcome<void, AZStd::string> WriteJsonString(const rapidjson::Document& document, AZStd::string& jsonText, WriteJsonSettings settings)
|
||||
|
||||
@@ -483,9 +483,9 @@ namespace AZ
|
||||
}
|
||||
private:
|
||||
static void ObjectStreamWriter(SerializeContext::EnumerateInstanceCallContext& callContext, const void* variantPtr,
|
||||
const SerializeContext::ClassData& variantClassData, const SerializeContext::ClassElement* variantClassElement)
|
||||
[[maybe_unused]] const SerializeContext::ClassData& variantClassData, const SerializeContext::ClassElement* variantClassElement)
|
||||
{
|
||||
auto alternativeVisitor = [&callContext, &variantClassData, variantClassElement](auto&& elementAlt)
|
||||
auto alternativeVisitor = [&callContext, variantClassElement](auto&& elementAlt)
|
||||
{
|
||||
using AltType = AZStd::remove_cvref_t<decltype(elementAlt)>;
|
||||
const SerializeContext& context = *callContext.m_context;
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace AZ
|
||||
#define AZ_DEFAULT_COPY_MOVE(_Class) AZ_DEFAULT_COPY(_Class) AZ_DEFAULT_MOVE(_Class)
|
||||
|
||||
// Macro that can be used to avoid unreferenced variable warnings
|
||||
#define AZ_UNUSED(x) (void)x;
|
||||
#define AZ_UNUSED(x) (void)x
|
||||
|
||||
#define AZ_DEFINE_ENUM_BITWISE_OPERATORS(EnumType) \
|
||||
inline constexpr EnumType operator | (EnumType a, EnumType b) \
|
||||
|
||||
@@ -876,22 +876,7 @@ namespace AZStd
|
||||
for (; first != last; ++first)
|
||||
{
|
||||
hash ^= static_cast<size_t>(*first);
|
||||
#if AZ_COMPILER_MSVC < 1924
|
||||
// Workaround for integer overflow warning for hash function when used in a constexpr context
|
||||
// The warning must be disabled at the call site and is a compiler bug that has been fixed
|
||||
// with Visual Studio 2019 version 16.4
|
||||
// https://developercommunity.visualstudio.com/content/problem/211134/unsigned-integer-overflows-in-constexpr-functionsa.html?childToView=211580#comment-211580
|
||||
constexpr size_t fnvPrimeHigh{ 0x100ULL };
|
||||
constexpr size_t fnvPrimeLow{ 0x000001b3 };
|
||||
const uint64_t hashHigh{ hash >> 32 };
|
||||
const uint64_t hashLow{ hash & 0xFFFF'FFFF };
|
||||
const uint64_t lowResult{ hashLow * fnvPrimeLow };
|
||||
const uint64_t fnvPrimeHighResult{ hashLow * fnvPrimeHigh };
|
||||
const uint64_t hashHighResult{ hashHigh * fnvPrimeLow };
|
||||
hash = (lowResult & 0xffff'ffff) + (((lowResult >> 32) + (fnvPrimeHighResult & 0xffff'ffff) + (hashHighResult & 0xffff'ffff)) << 32);
|
||||
#else
|
||||
hash *= fnvPrime;
|
||||
#endif
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ StackRecorder::Record(StackFrame* frames, unsigned int maxNumOfFrames, unsigned
|
||||
int skip = static_cast<int>((suppressCount == 0) ? 1 : suppressCount); // Skip at least this function
|
||||
while ((unw_step(&cursor) > 0) && (count < maxNumOfFrames))
|
||||
{
|
||||
unw_word_t offset, pc;
|
||||
unw_word_t pc;
|
||||
unw_get_reg(&cursor, UNW_REG_IP, &pc);
|
||||
if (pc == 0)
|
||||
{
|
||||
|
||||
@@ -1032,7 +1032,7 @@ namespace UnitTest
|
||||
auto CreateArray = []() constexpr -> AZStd::array<int, 3>
|
||||
{
|
||||
AZStd::array<int, 3> localArray = { {1, 2, 3} };
|
||||
auto resultFunc = AZStd::for_each(localArray.begin(), localArray.end(), [](int& element) { ++element; });
|
||||
AZStd::for_each(localArray.begin(), localArray.end(), [](int& element) { ++element; });
|
||||
return localArray;
|
||||
};
|
||||
constexpr AZStd::array<int, 3> testArray = CreateArray();
|
||||
@@ -1271,7 +1271,6 @@ namespace UnitTest
|
||||
|
||||
TEST_F(Algorithms, Unique_Compile_WhenUsedInConstexpr)
|
||||
{
|
||||
constexpr AZStd::array<int, 3> testList = { { 1, 2, 3 } };
|
||||
auto TestUnique = []() constexpr
|
||||
{
|
||||
AZStd::array<int, 6> localArray{ { 1, 2, 2, 5, 5, 6} };
|
||||
|
||||
@@ -940,9 +940,10 @@ namespace UnitTest
|
||||
// 64 Byte buffer is used to prevent AZStd::function for storing the
|
||||
// lambda internal storage using the small buffer optimization
|
||||
// Therefore causing the supplied allocator to be used
|
||||
AZStd::aligned_storage_t<64, 1> bufferToAvoidSmallBufferOptimization;
|
||||
[[maybe_unused]] AZStd::aligned_storage_t<64, 1> bufferToAvoidSmallBufferOptimization;
|
||||
auto xValueAndConstXValueFunc = [bufferToAvoidSmallBufferOptimization](int lhs, int rhs) -> int
|
||||
{
|
||||
AZ_UNUSED(bufferToAvoidSmallBufferOptimization);
|
||||
return lhs + rhs;
|
||||
};
|
||||
|
||||
|
||||
@@ -997,7 +997,7 @@ namespace UnitTest
|
||||
myclass_base_list.clear();
|
||||
auto reverseIterBegin = myclass_base_list.rbegin();
|
||||
auto reverseIterEnd = myclass_base_list.rend();
|
||||
EXPECT_EQ(reverseIterEnd, reverseIterEnd);
|
||||
EXPECT_EQ(reverseIterBegin, reverseIterEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ namespace UnitTest
|
||||
static constexpr size_t max_expected_size = MaxExpectedSize;
|
||||
};
|
||||
|
||||
constexpr size_t pairSize = sizeof(AZStd::compressed_pair<CompressedPairInternal::EmptyStruct, int32_t>);
|
||||
using CompressedPairTestConfigs = ::testing::Types<
|
||||
CompressedPairTestConfig<CompressedPairInternal::EmptyStruct, CompressedPairInternal::FinalEmptyStruct, 1>
|
||||
, CompressedPairTestConfig<CompressedPairInternal::EmptyStruct, int32_t, 4>
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace UnitTest
|
||||
myclass_base_set.clear();
|
||||
auto reverseIterBegin = myclass_base_set.rbegin();
|
||||
auto reverseIterEnd = myclass_base_set.rend();
|
||||
EXPECT_EQ(reverseIterEnd, reverseIterEnd);
|
||||
EXPECT_EQ(reverseIterBegin, reverseIterEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1229,7 +1229,7 @@ namespace UnitTest
|
||||
string_view subView2 = view2.substr(10);
|
||||
EXPECT_EQ("Haystack", subView2);
|
||||
AZ_TEST_START_TRACE_SUPPRESSION;
|
||||
string_view assertSubView = view2.substr(view2.size() + 1);
|
||||
[[maybe_unused]] string_view assertSubView = view2.substr(view2.size() + 1);
|
||||
AZ_TEST_STOP_TRACE_SUPPRESSION(1);
|
||||
|
||||
// compare
|
||||
@@ -1472,7 +1472,7 @@ namespace UnitTest
|
||||
|
||||
class WrappedInt
|
||||
{
|
||||
int val;
|
||||
[[maybe_unused]] int val;
|
||||
};
|
||||
|
||||
using ValidFormatArg = AZStd::string::_Format_Internal::ValidFormatArg;
|
||||
@@ -1751,6 +1751,7 @@ namespace UnitTest
|
||||
static constexpr basic_string_view<TypeParam> elementView1(compileTimeString1);
|
||||
static constexpr basic_string_view<TypeParam> elementView2(compileTimeString2);
|
||||
static_assert(elementView1.data(), "string_view.data() should be non-nullptr");
|
||||
static_assert(elementView2.data(), "string_view.data() should be non-nullptr");
|
||||
}
|
||||
|
||||
TYPED_TEST(BasicStringViewConstexprFixture, StringView_SizeOperatorsConstexpr)
|
||||
@@ -1779,7 +1780,7 @@ namespace UnitTest
|
||||
{
|
||||
using TypeParam = char;
|
||||
// null terminated compile time string
|
||||
auto MakeCompileTimeString1 = []() constexpr -> const TypeParam*
|
||||
[[maybe_unused]] auto MakeCompileTimeString1 = []() constexpr -> const TypeParam*
|
||||
{
|
||||
return "HelloWorld";
|
||||
};
|
||||
@@ -2131,7 +2132,6 @@ namespace UnitTest
|
||||
constexpr AZStd::fixed_string<128> test3{ AZStd::fixed_string<128>{}.insert(0, "Brown") };
|
||||
constexpr AZStd::fixed_string<128> test4{ AZStd::fixed_string<128>{ "App" }.insert(0, AZStd::string_view("Blue")) };
|
||||
constexpr AZStd::fixed_string<128> test5{ AZStd::fixed_string<128>{ "App" }.insert(0, test1, 2, 2) };
|
||||
constexpr AZStd::string_view redView("Red");
|
||||
constexpr AZStd::fixed_string<128> test6{ AZStd::fixed_string<128>{ "App" }.insert(size_t(0), 5, 'X') };
|
||||
constexpr AZStd::fixed_string<128> test7{ AZStd::fixed_string<128>{ "App" }.insert(0, "GreenTea", 5) };
|
||||
auto MakeFixedStringWithInsertWithIteratorPos1 = []() constexpr
|
||||
|
||||
@@ -318,8 +318,6 @@ namespace UnitTest
|
||||
using TestVariant2 = AZStd::variant<TestAlignedStorage, float, bool, int>;
|
||||
static_assert(sizeof(TestVariant1) == sizeof(TestVariant2), "with different permutations variants of same types should be the same size");
|
||||
using UnorderedVariant3 = AZStd::variant<AZStd::unordered_map<AZStd::string, AZStd::string>, TestAlignedStorage>;
|
||||
constexpr size_t testVariant1Size = sizeof(TestVariant1);
|
||||
constexpr size_t unorderedVariant3Size = sizeof(UnorderedVariant3);
|
||||
static_assert(sizeof(TestVariant1) == sizeof(UnorderedVariant3), "with different permutations variants of same types should be the same size");
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ TEST_F(AssetDataStreamTest, IsFullyLoaded_FileDoesNotReadAllData_DataIsNotFullyL
|
||||
using ::testing::_;
|
||||
|
||||
ON_CALL(m_mockStreamer, GetReadRequestResult(_, _, _, _))
|
||||
.WillByDefault([this, incompleteAssetSize](
|
||||
.WillByDefault([this](
|
||||
[[maybe_unused]] FileRequestHandle request,
|
||||
void*& buffer,
|
||||
AZ::u64& numBytesRead,
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace UnitTest
|
||||
});
|
||||
|
||||
ON_CALL(m_mockStreamer, GetRequestStatus(_))
|
||||
.WillByDefault([this]([[maybe_unused]] FileRequestHandle request)
|
||||
.WillByDefault([]([[maybe_unused]] FileRequestHandle request)
|
||||
{
|
||||
// Return whatever request status has been set in this class
|
||||
return IO::IStreamerTypes::RequestStatus::Completed;
|
||||
|
||||
@@ -226,8 +226,10 @@ namespace AZ::Debug
|
||||
AZStd::thread threads[totalThreads];
|
||||
for (size_t threadIndex = 0; threadIndex < totalThreads; ++threadIndex)
|
||||
{
|
||||
threads[threadIndex] = AZStd::thread([&startLogging, &totalRecordsWritten, &message, recordsPerThreadCount]()
|
||||
threads[threadIndex] = AZStd::thread([&startLogging, &message, &totalRecordsWritten]()
|
||||
{
|
||||
AZ_UNUSED(message);
|
||||
|
||||
while (!startLogging)
|
||||
{
|
||||
AZStd::this_thread::yield();
|
||||
|
||||
@@ -2837,7 +2837,7 @@ namespace UnitTest
|
||||
handlerList.emplace_back(i, maxSleep);
|
||||
}
|
||||
|
||||
auto work = [maxSleep, threadCount]()
|
||||
auto work = []()
|
||||
{
|
||||
char sentinel[64] = { 0 };
|
||||
char* end = sentinel + AZ_ARRAY_SIZE(sentinel);
|
||||
@@ -2923,7 +2923,7 @@ namespace UnitTest
|
||||
|
||||
MyEventGroupImpl handler;
|
||||
|
||||
auto work = [maxSleep, &handler]()
|
||||
auto work = [&handler]()
|
||||
{
|
||||
for (int i = 1; i < cycleCount; ++i)
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace UnitTest
|
||||
auto EnumerateTestEnum = []() constexpr -> bool
|
||||
{
|
||||
int count = 0;
|
||||
for (TestEnumEnumeratorValueAndString enumMember : TestEnumMembers)
|
||||
for ([[maybe_unused]] TestEnumEnumeratorValueAndString enumMember : TestEnumMembers)
|
||||
{
|
||||
++count;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
// Reroute the mock stream to our output MemoryStream for writing.
|
||||
ON_CALL(m_mockGenericStream, Write(_, _))
|
||||
.WillByDefault([this, &outputStream](AZ::IO::SizeType bytes, const void* buffer)
|
||||
.WillByDefault([&outputStream](AZ::IO::SizeType bytes, const void* buffer)
|
||||
{
|
||||
return outputStream.Write(bytes, buffer);
|
||||
});
|
||||
|
||||
@@ -1361,7 +1361,7 @@ namespace UnitTest
|
||||
AZ::JobCompletion completion;
|
||||
|
||||
// Push a parent job that pushes the work as child jobs (requires the current job, so this is a real world test of "functor with current job as param")
|
||||
AZ::Job* parentJob = AZ::CreateJobFunction([this, &jobData, JobCount](AZ::Job& thisJob)
|
||||
AZ::Job* parentJob = AZ::CreateJobFunction([this, &jobData](AZ::Job& thisJob)
|
||||
{
|
||||
EXPECT_EQ(m_jobManager->GetCurrentJob(), &thisJob);
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Benchmark
|
||||
// This function only exist to calculate AZ::Crc32 values at compile time
|
||||
for (auto _ : state)
|
||||
{
|
||||
constexpr auto resultArray = Crc32Internal::GenerateTestCrc32Values();
|
||||
[[maybe_unused]] constexpr auto resultArray = Crc32Internal::GenerateTestCrc32Values();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,9 +117,6 @@ namespace UnitTest
|
||||
EXPECT_TRUE(AZ::ShapeIntersection::Classify(frustum, s2) == AZ::IntersectResult::Exterior);
|
||||
}
|
||||
|
||||
AZ::Vector3 axisX = AZ::Vector3::CreateAxisX();
|
||||
AZ::Vector3 axisY = AZ::Vector3::CreateAxisY();
|
||||
AZ::Vector3 axisZ = AZ::Vector3::CreateAxisZ();
|
||||
{
|
||||
AZ::Obb obb = AZ::Obb::CreateFromPositionRotationAndHalfLengths(
|
||||
AZ::Vector3(0.0f, -3.9f, 0.0f), AZ::Quaternion::CreateIdentity(), AZ::Vector3::CreateOne());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user