Commit Graph

5641 Commits

Author SHA1 Message Date
Chris Burel 382ca192c8 Fix Node/Skeleton uint32->size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 09:17:27 -07:00
Chris Burel 85c96c7596 Remove static_cast<uint32> from MemoryFile
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:38 -07:00
Chris Burel 404ab51439 uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:36 -07:00
Chris Burel 88a9a4fb5d Correct signature of MCore::MemSet to match memset
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:19 -07:00
Chris Burel 916b3a94d6 Convert MCoreCommandManager uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:18 -07:00
Chris Burel 387a1faf23 Convert IDGenerator uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:16 -07:00
Chris Burel ce139d6ae9 Remove unused HashFunctions functions
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:14 -07:00
Chris Burel 5a4b0f5770 Convert Math::Align to a template, so it doesn't depend on the uint32 type
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:12 -07:00
Chris Burel 24fa61f59e Convert DiskFile to not need uint32
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:10 -07:00
Chris Burel 38217651c5 Convert CommandSyntax uint32->size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:08 -07:00
Chris Burel f4442425ed Convert CommandManagerCallback uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:07 -07:00
Chris Burel a86e2ddf24 Convert MCore::CommandLine uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:05 -07:00
Chris Burel 889cdd8c0a Convert MCore::Command uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:03 -07:00
Chris Burel d712c54e20 Convert BoundingSphere to use int32_t to match AZ::Vector3::GetElement's signature
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:37:01 -07:00
Chris Burel b8695742d9 Convert MCore Attribute classes uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:36:59 -07:00
Chris Burel a04a0965cc Convert AlignedArray uint32->size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:36:57 -07:00
Chris Burel db622de75f Convert MCore Algorithms to use size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:36:56 -07:00
Chris Burel c3ff3f342d Update StringIdPool to use AZ::u32 instead of uint32
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:36:54 -07:00
Chris Burel 0a56c17519 Remove unused MCore::AbstractData class
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:36:52 -07:00
Chris Burel 8884227fe6 Remove MCore::Array
This translates all usages of MCore::Array to AZStd::vector. It is
designed to be as minimal of a change as possible (no changing to
range-for loops or other C++11 stuff).

We can decide to submit this wholesale, or submit it to a separate
branch that we can then integrate individual files from once we're ready
to do a specific class's transition.

It does not completely solve the `uint32`->`size_t` transition.

One important finding from doing this: `MCore::Array` uses a `memcpy`
when it reallocates. `AZStd::vector` will use the contained type's copy
or move constructor, per element. This is a significant change in
behavior. If you have type, `SomeStruct` that defines a destructor, that
type is copyable and not movable. So if you have a
`MCore::Array<SomeStruct>`, and you call `Add(); Add(); Add()`, that
reallocates 3 times, copying the contents using `memcpy`, and never
invokes `SomeStruct`'s copy constructor or destructor. Translating that
to `AZStd::vector<SomeStruct>` and calling `push_back(); push_back();
push_back();` will still reallocate 3 times, but it sees that
`SomeStruct` is non-movable, and uses the copy constructor to make the
copies, and then the destructor on the previous values. This call to the
destructor wasn't there before, and can cause things to be deleted that
weren't before. The solution to this is to make that struct be a
move-only type. Where possible, this was done by changing that type to
use `AZStd::unique_ptr` instead of a raw pointer, to get the proper move
behavior. Where that is not possible (types that inherit from
`MCore::MemoryObject`), a hand-written move constructor was created.

In general:
GetLength() becomes size()
GetMaxLength() becomes capacity()
GetIsEmpty() becomes empty()
Reserve() becomes reserve()
ReserveExact() becomes reserve()
Resize() becomes resize()
ResizeFast() becomes resize_no_construct()
Add() becomes emplace_back()
AddExact() becomes emplace_back()
AddEmpty() becomes emplace_back()
AddEmptyExact() becomes emplace_back()
GetPtr() becomes data()
GetItem() becomes at()
Shrink() becomes shrink_to_fit()
GetFirst() becomes front()
GetLast() becomes back()
Remove() becomes erase()
RemoveFirst() becomes erase()
RemoveLast() becomes pop_back()
RemoveByValue() becomes if (const auto it = AZStd::find(...); it != end(container)) container.erase(it);
Insert() becomes emplace()
Swap() becomes swap()
Clear(true) becomes clear(); shrink_to_fit()
Clear() becomes clear(); shrink_to_fit()
Clear(false) becomes clear()
Swap() becomes swap()
Find() becomes AZStd::find
MoveElements() becomes AZStd::move
SetMemoryCategory() is removed

Signed-off-by: Chris Burel <burelc@amazon.com>
2021-08-09 08:36:43 -07:00
Guthrie Adams 211432fe5f Merge pull request #2689 from aws-lumberyard-dev/lawalfua/atomToolsMainWindow
AtomToolsMainWindow, making a base class for atom tools windows ATOM-415
2021-08-09 10:08:54 -05:00
hultonha 30c277bc56 Editor code: tidy up BOOLs,NULLs and overrides pt2.
Merge pull request #2873 from nemerle/tidy_up_editor_code_a_bit_split2
2021-08-09 15:29:54 +01:00
hultonha 3d15382fb6 Camera Component, Editor Viewport Widget refactoring.
Merge pull request #2840 from yuriy0/camera_and_editor_viewport_widget_improvements
2021-08-09 14:01:41 +01:00
hultonha 1f9e976fe4 Adding Setting to allow the user to choose the max number of items to show in the Search View
Merge pull request #1679 from aws-lumberyard-dev/LYN-4700
2021-08-09 12:52:29 +01:00
hultonha 659e486cd7 Add an integration test to validate pick mode crash (#2935)
* add an integration test to validate pick mode crash

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update to test after review feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>
2021-08-09 11:56:19 +01:00
greerdv 5baa74ea40 Merge pull request #2944 from aws-lumberyard-dev/jonawals_SPEC-4851_staging_approved
Add previously approved changes.
2021-08-09 10:52:32 +01:00
igarri 7b5ecfb7d9 Merge branch 'develop' into LYN-4700
Signed-off-by: igarri <igarri@amazon.com>
2021-08-09 09:32:42 +01:00
Benjamin Jillich 868d718a18 Added automatic bounding box expansion, fixed several bugs in the aabb calculations and removed node OBBs (#2871)
Merge pull request #2871 from aws-lumberyard-dev/jillich/EmfxAabbImprovements
2021-08-09 01:19:42 -07:00
Benjamin Jillich 733dc31518 Fixed emfx unit tests
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2021-08-09 09:44:56 +02:00
Esteban Papp dcfeae1cc9 warnings not previously detected (#2954)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-06 16:24:06 -07:00
amzn-phist 6b2c9cbede Fix a crash when reloading AudioControlEditor controls (#2729)
* Fix a crash when reloading ACE controls data

The crash was due to destruction of xml_node that was held in a
unique_ptr.  Rapidxml has a very rudimentary memory allocation design,
so in most cases dynamic allocations aren't even made.  The memory_pool
does all the cleanup in its destructor, so having a unique_ptr run its
default_delete was causing the crash.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Fix numerical conversion warnings

Wwise source files needed a few fixes for the numerical conversion
warning changes that went in recently.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
2021-08-06 16:23:01 -05:00
Scott Romero 9a8a411a0b [development] removal of unused and low stakes code related to Cry-threading (#2896)
Removal highlights include:
 - File indexer (used CryThread<>) linked to long gone asset browser
 - Producer/consumer queues from CryMT
 - set/vector/CLocklessPointerQueue containers also from CryMT
 - Cry interlocked linked list and _InterlockedCompareExchange128
 - CryThread type
 - SAtomicVar types
 - CryAutoSet type
 - Various unused lock types
 -- AutoLockModify
 -- AutoLockRead
 -- CryOptionalAutoLock
 -- CryReadModifyLock
 -- CryRWLock
 -- ReadLock
 -- ReadLockCond
 -- WriteAfterReadLock
 - Misc. unused functions
 -- CryInterLockedAdd (not to be confused with CryInterlockedAdd, using a lower case "locked")
 -- CryInterlockedExchange64 (which was only defined for unix platforms)
 -- SpinLock
 -- JobSpinLock
 -- AtomicAdd
 -- JobAtomicAdd

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
2021-08-06 13:23:14 -07:00
Shirang Jia 4f9382e8c6 Include build failure root cause in email notification (#2491) (#2888)
Signed-off-by: shiranj <shiranj@amazon.com>
2021-08-06 12:52:04 -07:00
John 7b0118268c Remove missing header from cmake.
Signed-off-by: John <jonawals@amazon.com>
2021-08-06 20:40:37 +01:00
John d7c1185dc2 Add previously approved changes.
Signed-off-by: John <jonawals@amazon.com>
2021-08-06 20:09:53 +01:00
Vincent Liu 8e3b25e606 [LYN-5268] Copy resource mapping tool to install target and add argument for log path (#2819)
Updates to make resource mapping tool work with the installer. Ensure correct log path.
2021-08-06 12:03:36 -07:00
Jeremy Ong ca3bc3d343 Merge pull request #2937 from aws-lumberyard-dev/AzCore/JobGraph
Resolve size_t conversion werrors
2021-08-06 12:48:59 -06:00
Arazu161 5c137ae267 Mark parameter as [[maybe_unused]] to remove unused parameter warning/error (#2596)
Signed-off-by: Arazu161 <11294502+Arazu161@users.noreply.github.com>
2021-08-06 10:55:59 -07:00
Jeremy Ong 4ab7aa551d Resolve size_t conversion werrors
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-08-06 10:44:08 -06:00
moraaar 9e0b8c564d Fixed AzToolsFramework tests (#2887)
* Fixed AzToolsFramework unit tests.

Signed-off-by: moraaar <moraaar@amazon.com>

* Include missing header.

Signed-off-by: moraaar <moraaar@amazon.com>

* Using util's class to generate temp directory, instead of qt.

Signed-off-by: moraaar <moraaar@amazon.com>

* Added empty line

Signed-off-by: moraaar <moraaar@amazon.com>

* Fixed warning in MessageTest fixture that CacheProjectRootFolder was not set

Signed-off-by: moraaar <moraaar@amazon.com>

* Additional checks in CreateDefaultEditorEntity helper function.

Signed-off-by: moraaar <moraaar@amazon.com>

* Updated the AzToolsFrameworkTest logic to set the project cache path

The Project Cache Path and Project Path is set through the CommandLine functionality of the ComponentApplication.
This allows those Project Cache Path and Project Path to be set within the Settings Registry during the ComponentApplication constructor

Removed the explicitly calls to delete the temporary directory and fixed the ScopedTemporaryDirectory class to recursively delete the temporary directory

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Setup correctly @assets@ alias for PlatformAddressedAssetCatalogManagerTest and AssetSeedManagerTest fixtures.

- These 2 test fixtures need to manually set the @asset@ alias to not include the platform at the end (which it does by default), because they are looping over platforms in their setup.
- Also initializing pointers to nullptr, so if setup fail in the future the teardown doesn't crash trying to delete garbage.

Signed-off-by: moraaar <moraaar@amazon.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-08-06 11:07:15 -05:00
Chris Galvan c2c59eae05 Merge pull request #2932 from aws-lumberyard-dev/cgalvan/FixAssetBrowserPathMenuOptions
Fixed Asset Browser path related context menu options.
2021-08-06 10:27:50 -05:00
AMZN-nggieber 2c7f6f9742 Adds Links to Gem Directory and Documentation for Gems (#2922)
* Changed blue text to white that is not meant as a link, made 'View in Director' link work for gems in the inspector, added parsing for gem documentation link

Signed-off-by: nggieber <nggieber@amazon.com>

* Added documentation links for gems, changed markup for urls in summaries and requirements so they are clickable

Signed-off-by: nggieber <nggieber@amazon.com>

* Fixed a couple of the documentation links

Signed-off-by: nggieber <nggieber@amazon.com>

* Added documentation url to edit gem properties script and updated unit tests

Signed-off-by: nggieber <nggieber@amazon.com>
2021-08-06 10:19:35 -05:00
Jeremy Ong 5a05fe93d4 Merge pull request #2815 from aws-lumberyard-dev/AzCore/JobGraph
Add initial TaskGraph prototype
2021-08-06 08:54:31 -06:00
Yuriy Toporovskyy fd616fdcfb Merge remote-tracking branch 'upstream/development' into camera_and_editor_viewport_widget_improvements
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
2021-08-06 10:32:38 -04:00
Yuriy Toporovskyy 6e59b1f519 Remove include of deleted file
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
2021-08-06 10:30:57 -04:00
Chris Galvan eeb1b68a72 Updated string to string_view per PR feedback.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-08-06 09:23:33 -05:00
greerdv 053c4af66d Merge pull request #2928 from aws-lumberyard-dev/physx_docs_links
fix docs links for physx, cloth, blast and white box
2021-08-06 13:55:50 +01:00
hultonha 1cb0860d4d Editor code: tidy up BOOLs,NULLs and overrides pt4.
Merge pull request #2875 from nemerle/tidy_up_editor_code_a_bit_split4
2021-08-06 12:57:15 +01:00
Chris Galvan 3986a11396 Fixed Asset Browser path related context menu options.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-08-06 06:52:11 -05:00
hultonha ff8c4dce00 Ensure we disconnect from EditorInteractionSystemViewportSelectionRequestBus while recreating m_interactionRequests (#2884)
Fixes a crash while selecting an entity in the viewport while in 'pick' mode.
2021-08-06 12:50:31 +01:00