From 4d8cc9aef7d220c3992494dea552fa239b915f31 Mon Sep 17 00:00:00 2001 From: "W2.Wizard" Date: Tue, 5 Jan 2021 02:14:21 +0100 Subject: [PATCH] Fixed additional typos Went through the source with VNNCC to correct as many found typos as possible Co-Authored-By: VNC <52937757+VNNCC@users.noreply.github.com> --- .../Editor/Modules/ContentImportingModule.cs | 2 +- Source/Engine/CSG/CSGMesh.Triangulate.cpp | 16 ++++++++-------- Source/Engine/CSG/CSGMesh.cpp | 8 ++++---- Source/Engine/Debug/Exception.h | 2 +- .../Graph/CPU/ParticleEmitterGraph.CPU.h | 2 +- .../Engine/Particles/ParticlesSimulation.cpp | 2 +- Source/Engine/Render2D/Font.cpp | 2 +- Source/Engine/Render2D/FontManager.cpp | 2 +- Source/Engine/Serialization/Stream.h | 4 ++-- Source/Engine/Streaming/StreamingManager.cpp | 2 +- .../Tools/MaterialGenerator/MaterialLayer.cpp | 2 +- .../Tools/ModelTool/ModelTool.Assimp.cpp | 2 +- .../Engine/Tools/TextureTool/TextureTool.cpp | 4 ++-- Source/Engine/UI/GUI/Common/Dropdown.cs | 2 +- Source/Engine/UI/GUI/ContainerControl.cs | 2 +- Source/Engine/UI/GUI/Panels/SplitPanel.cs | 16 ++++++++-------- Source/Engine/UI/GUI/WindowRootControl.cs | 8 ++++---- Source/Engine/Utilities/StateMachine.h | 2 +- .../Build/Plugins/VisualScriptingPlugin.cs | 2 +- Source/Tools/Flax.Build/Build/Target.cs | 2 +- Source/Tools/Flax.Stats/CodeFrameNode.cs | 18 +++++++++--------- Source/Tools/Flax.Stats/Tools.cs | 4 ++-- 22 files changed, 53 insertions(+), 53 deletions(-) diff --git a/Source/Editor/Modules/ContentImportingModule.cs b/Source/Editor/Modules/ContentImportingModule.cs index 03f434b9c..0c934f130 100644 --- a/Source/Editor/Modules/ContentImportingModule.cs +++ b/Source/Editor/Modules/ContentImportingModule.cs @@ -410,7 +410,7 @@ namespace FlaxEditor.Modules { if (request.Settings != null && entry.TryOverrideSettings(request.Settings)) { - // Use overriden settings + // Use overridden settings } else if (!request.SkipSettingsDialog) { diff --git a/Source/Engine/CSG/CSGMesh.Triangulate.cpp b/Source/Engine/CSG/CSGMesh.Triangulate.cpp index bb814653b..8a64f4042 100644 --- a/Source/Engine/CSG/CSGMesh.Triangulate.cpp +++ b/Source/Engine/CSG/CSGMesh.Triangulate.cpp @@ -22,7 +22,7 @@ bool CSG::Mesh::Triangulate(RawData& data, Array& cacheVB) const Array surfaceCacheVB(32); // Cache submeshes by material to lay them down - // key- brush index, value- direcotry for surafecs (key: surface index, value: list with start vertex per triangle) + // key- brush index, value- direcotry for surfaces (key: surface index, value: list with start vertex per triangle) Dictionary>> polygonsPerBrush(64); // Build index buffer @@ -115,8 +115,8 @@ bool CSG::Mesh::Triangulate(RawData& data, Array& cacheVB) const tangent.Normalize(); // Gram-Schmidt orthogonalize - Vector3 newTangentUnormalized = tangent - normal * Vector3::Dot(normal, tangent); - const float length = newTangentUnormalized.Length(); + Vector3 newTangentUnnormalized = tangent - normal * Vector3::Dot(normal, tangent); + const float length = newTangentUnnormalized.Length(); // Workaround to handle degenerated case if (Math::IsZero(length)) @@ -129,7 +129,7 @@ bool CSG::Mesh::Triangulate(RawData& data, Array& cacheVB) const } else { - tangent = newTangentUnormalized / length; + tangent = newTangentUnnormalized / length; bitangent.Normalize(); } @@ -217,12 +217,12 @@ bool CSG::Mesh::Triangulate(RawData& data, Array& cacheVB) const auto& vertex = cacheVB[triangleStartVertex + k]; Vector3 projected = Vector3::Project(vertex.Position, 0, 0, 1000, 1000, 0, 1, vp); - Vector2 projectecXY = Vector2(projected); + Vector2 projectedXY = Vector2(projected); - min = Vector2::Min(projectecXY, min); - max = Vector2::Max(projectecXY, max); + min = Vector2::Min(projectedXY, min); + max = Vector2::Max(projectedXY, max); - pointsCache.Add(projectecXY); + pointsCache.Add(projectedXY); } } diff --git a/Source/Engine/CSG/CSGMesh.cpp b/Source/Engine/CSG/CSGMesh.cpp index cc4897d3a..9a885a35d 100644 --- a/Source/Engine/CSG/CSGMesh.cpp +++ b/Source/Engine/CSG/CSGMesh.cpp @@ -38,7 +38,7 @@ void CSG::Mesh::PerformOperation(Mesh* other) { case Mode::Additive: { - // Check if both meshes do not intesect + // Check if both meshes do not intersect if (AABB::IsOutside(_bounds, other->GetBounds())) // TODO: test every sub bounds not whole _bounds { // Add vertices to the mesh without any additional calculations @@ -57,7 +57,7 @@ void CSG::Mesh::PerformOperation(Mesh* other) case Mode::Subtractive: { - // Check if both meshes do not intesect + // Check if both meshes do not intersect if (AABB::IsOutside(_bounds, other->GetBounds())) // TODO: test every sub bounds not whole _bounds { // Do nothing @@ -141,7 +141,7 @@ void CSG::Mesh::intersect(const Mesh* other, PolygonOperation insideOp, PolygonO // insideOp - operation for polygons being inside the other brush // outsideOp - operation for polygons being outside the other brush - // Prevent from redudant action + // Prevent from redundant action if (insideOp == Keep && outsideOp == Keep) return; @@ -180,7 +180,7 @@ void CSG::Mesh::intersectSubMesh(const Mesh* other, int32 subMeshIndex, PolygonO int32 startBrushSurface = brushMeta.StartSurfaceIndex; int32 endBrushSurface = startBrushSurface + brushMeta.SurfacesCount; - // Check every polygon (itereate fron end since we can ass new polygons and we don't want to process them) + // Check every polygon (iterate from end since we can ass new polygons and we don't want to process them) for (int32 i = _polygons.Count() - 1; i >= 0; i--) { auto& polygon = _polygons[i]; diff --git a/Source/Engine/Debug/Exception.h b/Source/Engine/Debug/Exception.h index 481c78589..5bef7aa55 100644 --- a/Source/Engine/Debug/Exception.h +++ b/Source/Engine/Debug/Exception.h @@ -36,7 +36,7 @@ namespace Log /// /// Additional information that help describe error Exception(const String& additionalInfo) - : Exception(TEXT("An exception has occured."), additionalInfo) + : Exception(TEXT("An exception has occurred."), additionalInfo) { } diff --git a/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h b/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h index a93c50ec2..cc1b5b6b2 100644 --- a/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h +++ b/Source/Engine/Particles/Graph/CPU/ParticleEmitterGraph.CPU.h @@ -100,7 +100,7 @@ public: public: /// - /// Determinates whenever this emitter uses lights rendering. + /// Determinate whenever this emitter uses lights rendering. /// /// True if emitter uses lights rendering, otherwise false. FORCE_INLINE bool UsesLightRendering() const diff --git a/Source/Engine/Particles/ParticlesSimulation.cpp b/Source/Engine/Particles/ParticlesSimulation.cpp index bbba833ff..0b6e3691d 100644 --- a/Source/Engine/Particles/ParticlesSimulation.cpp +++ b/Source/Engine/Particles/ParticlesSimulation.cpp @@ -115,7 +115,7 @@ int32 ParticleSystemInstance::GetParticlesCount() const const auto desc = GPUBufferDescription::Buffer(Emitters.Count() * sizeof(uint32), GPUBufferFlags::None, PixelFormat::Unknown, nullptr, sizeof(uint32), GPUResourceUsage::StagingReadback); if (GPUParticlesCountReadback->Init(desc)) { - LOG(Error, "Failed to create GPU particles coun readback buffer."); + LOG(Error, "Failed to create GPU particles count readback buffer."); } } diff --git a/Source/Engine/Render2D/Font.cpp b/Source/Engine/Render2D/Font.cpp index c9dd7b55c..209989d4f 100644 --- a/Source/Engine/Render2D/Font.cpp +++ b/Source/Engine/Render2D/Font.cpp @@ -33,7 +33,7 @@ Font::~Font() void Font::GetCharacter(Char c, FontCharacterEntry& result) { - // Try get character or cache it if cannot find + // Try to get the character or cache it if cannot be found if (!_characters.TryGet(c, result)) { // This thread race condition may happen in editor but in game we usually do all stuff with fonts on main thread (chars caching) diff --git a/Source/Engine/Render2D/FontManager.cpp b/Source/Engine/Render2D/FontManager.cpp index f05cd7280..ec7a61257 100644 --- a/Source/Engine/Render2D/FontManager.cpp +++ b/Source/Engine/Render2D/FontManager.cpp @@ -214,7 +214,7 @@ bool FontManager::AddNewEntry(Font* font, Char c, FontCharacterEntry& entry) return false; } - // Copy glyph data after rasterize (row by row) + // Copy glyph data after rasterization (row by row) for (int32 row = 0; row < glyphHeight; row++) { Platform::MemoryCopy(&GlyphImageData[row * glyphWidth], &bitmap->buffer[row * bitmap->pitch], glyphWidth); diff --git a/Source/Engine/Serialization/Stream.h b/Source/Engine/Serialization/Stream.h index de7911fb4..d988a24df 100644 --- a/Source/Engine/Serialization/Stream.h +++ b/Source/Engine/Serialization/Stream.h @@ -37,9 +37,9 @@ public: public: /// - /// Returns true if error occured during reading/writing to the stream + /// Returns true if error occurred during reading/writing to the stream /// - /// True if error occured during reading/writing to the stream + /// True if error occurred during reading/writing to the stream virtual bool HasError() const { return _hasError; diff --git a/Source/Engine/Streaming/StreamingManager.cpp b/Source/Engine/Streaming/StreamingManager.cpp index d82a3b5ab..3b557e85f 100644 --- a/Source/Engine/Streaming/StreamingManager.cpp +++ b/Source/Engine/Streaming/StreamingManager.cpp @@ -92,7 +92,7 @@ void UpdateResource(StreamableResource* resource, DateTime now) } } - // Calculate residency level to stream in (resources may want to incease/decrease it's quality in steps rather than at once) + // Calculate residency level to stream in (resources may want to increase/decrease it's quality in steps rather than at once) int32 requestedResidency = handler->CalculateRequestedResidency(resource, targetResidency); // Create streaming task (resource type specific) diff --git a/Source/Engine/Tools/MaterialGenerator/MaterialLayer.cpp b/Source/Engine/Tools/MaterialGenerator/MaterialLayer.cpp index c7f940574..41679a6a3 100644 --- a/Source/Engine/Tools/MaterialGenerator/MaterialLayer.cpp +++ b/Source/Engine/Tools/MaterialGenerator/MaterialLayer.cpp @@ -64,7 +64,7 @@ void MaterialLayer::Prepare() Guid MaterialLayer::GetMappedParamId(const Guid& id) { - // TODO: test ParamIdsMappings using Dictionary. will performance change? mamybe we don't wont to allocate too much memory + // TODO: test ParamIdsMappings using Dictionary. will performance change? maybe we don't wont to allocate too much memory for (int32 i = 0; i < ParamIdsMappings.Count(); i++) { diff --git a/Source/Engine/Tools/ModelTool/ModelTool.Assimp.cpp b/Source/Engine/Tools/ModelTool/ModelTool.Assimp.cpp index fef8d7f3c..50914ea2e 100644 --- a/Source/Engine/Tools/ModelTool/ModelTool.Assimp.cpp +++ b/Source/Engine/Tools/ModelTool/ModelTool.Assimp.cpp @@ -355,7 +355,7 @@ bool ProcessMesh(AssimpImporterData& data, const aiMesh* aMesh, MeshData& mesh, mesh.BlendIndices.SetAll(Int4::Zero); mesh.BlendWeights.SetAll(Vector4::Zero); - // Build skinning clusters and fill controls points data stutcture + // Build skinning clusters and fill controls points data structure for (unsigned boneId = 0; boneId < aMesh->mNumBones; boneId++) { const auto aBone = aMesh->mBones[boneId]; diff --git a/Source/Engine/Tools/TextureTool/TextureTool.cpp b/Source/Engine/Tools/TextureTool/TextureTool.cpp index a8af48764..97e4df253 100644 --- a/Source/Engine/Tools/TextureTool/TextureTool.cpp +++ b/Source/Engine/Tools/TextureTool/TextureTool.cpp @@ -316,7 +316,7 @@ bool TextureTool::Convert(TextureData& dst, const TextureData& src, const PixelF } if (src.Format == dstFormat) { - LOG(Warning, "Soure data and destination format are the same. Cannot perform conversion."); + LOG(Warning, "Source data and destination format are the same. Cannot perform conversion."); return true; } if (src.Depth != 1) @@ -343,7 +343,7 @@ bool TextureTool::Resize(TextureData& dst, const TextureData& src, int32 dstWidt } if (src.Width == dstWidth && src.Height == dstHeight) { - LOG(Warning, "Soure data and destination dimensions are the same. Cannot perform resizing."); + LOG(Warning, "Source data and destination dimensions are the same. Cannot perform resizing."); return true; } if (src.Depth != 1) diff --git a/Source/Engine/UI/GUI/Common/Dropdown.cs b/Source/Engine/UI/GUI/Common/Dropdown.cs index e78300e1a..917e51f6e 100644 --- a/Source/Engine/UI/GUI/Common/Dropdown.cs +++ b/Source/Engine/UI/GUI/Common/Dropdown.cs @@ -26,7 +26,7 @@ namespace FlaxEngine.GUI public Action ItemClicked; /// - /// Occurs when popup losts focus. + /// Occurs when popup lost focus. /// public Action LostFocus; diff --git a/Source/Engine/UI/GUI/ContainerControl.cs b/Source/Engine/UI/GUI/ContainerControl.cs index 44f8c782a..0fecef9ef 100644 --- a/Source/Engine/UI/GUI/ContainerControl.cs +++ b/Source/Engine/UI/GUI/ContainerControl.cs @@ -636,7 +636,7 @@ namespace FlaxEngine.GUI } /// - /// Draws the children. Can be overriden to provide some customizations. Draw is performed with applied clipping mask for the client area. + /// Draws the children. Can be overridden to provide some customizations. Draw is performed with applied clipping mask for the client area. /// protected virtual void DrawChildren() { diff --git a/Source/Engine/UI/GUI/Panels/SplitPanel.cs b/Source/Engine/UI/GUI/Panels/SplitPanel.cs index 733e0b3a1..04160db25 100644 --- a/Source/Engine/UI/GUI/Panels/SplitPanel.cs +++ b/Source/Engine/UI/GUI/Panels/SplitPanel.cs @@ -12,12 +12,12 @@ namespace FlaxEngine.GUI /// /// The splitter size (in pixels). /// - public const int SpliterSize = 4; + public const int SplitterSize = 4; /// /// The splitter half size (in pixels). /// - private const int SpliterSizeHalf = SpliterSize / 2; + private const int SplitterSizeHalf = SplitterSize / 2; private Orientation _orientation; private float _splitterValue; @@ -105,12 +105,12 @@ namespace FlaxEngine.GUI if (_orientation == Orientation.Horizontal) { var split = Mathf.RoundToInt(_splitterValue * Width); - _splitterRect = new Rectangle(Mathf.Clamp(split - SpliterSizeHalf, 0.0f, Width), 0, SpliterSize, Height); + _splitterRect = new Rectangle(Mathf.Clamp(split - SplitterSizeHalf, 0.0f, Width), 0, SplitterSize, Height); } else { var split = Mathf.RoundToInt(_splitterValue * Height); - _splitterRect = new Rectangle(0, Mathf.Clamp(split - SpliterSizeHalf, 0.0f, Height), Width, SpliterSize); + _splitterRect = new Rectangle(0, Mathf.Clamp(split - SplitterSizeHalf, 0.0f, Height), Width, SplitterSize); } } @@ -226,14 +226,14 @@ namespace FlaxEngine.GUI if (_orientation == Orientation.Horizontal) { var split = Mathf.RoundToInt(_splitterValue * Width); - Panel1.Bounds = new Rectangle(0, 0, split - SpliterSizeHalf, Height); - Panel2.Bounds = new Rectangle(split + SpliterSizeHalf, 0, Width - split - SpliterSizeHalf, Height); + Panel1.Bounds = new Rectangle(0, 0, split - SplitterSizeHalf, Height); + Panel2.Bounds = new Rectangle(split + SplitterSizeHalf, 0, Width - split - SplitterSizeHalf, Height); } else { var split = Mathf.RoundToInt(_splitterValue * Height); - Panel1.Bounds = new Rectangle(0, 0, Width, split - SpliterSizeHalf); - Panel2.Bounds = new Rectangle(0, split + SpliterSizeHalf, Width, Height - split - SpliterSizeHalf); + Panel1.Bounds = new Rectangle(0, 0, Width, split - SplitterSizeHalf); + Panel2.Bounds = new Rectangle(0, split + SplitterSizeHalf, Width, Height - split - SplitterSizeHalf); } } } diff --git a/Source/Engine/UI/GUI/WindowRootControl.cs b/Source/Engine/UI/GUI/WindowRootControl.cs index 03a994aa6..23330ffae 100644 --- a/Source/Engine/UI/GUI/WindowRootControl.cs +++ b/Source/Engine/UI/GUI/WindowRootControl.cs @@ -262,14 +262,14 @@ namespace FlaxEngine.GUI return false; // Change focused control - Control prevous = _focusedControl; + Control previous = _focusedControl; _focusedControl = c; // Fire events - if (prevous != null) + if (previous != null) { - prevous.OnLostFocus(); - Assert.IsFalse(prevous.IsFocused); + previous.OnLostFocus(); + Assert.IsFalse(previous.IsFocused); } if (_focusedControl != null) { diff --git a/Source/Engine/Utilities/StateMachine.h b/Source/Engine/Utilities/StateMachine.h index 292a67978..38e69a06b 100644 --- a/Source/Engine/Utilities/StateMachine.h +++ b/Source/Engine/Utilities/StateMachine.h @@ -50,7 +50,7 @@ public: /// /// Checks if can exit from that state /// - /// Next state to ener after exit from the current state + /// Next state to enter after exit from the current state /// True if can exit from that state, otherwise false virtual bool CanExit(State* nextState) const { diff --git a/Source/Tools/Flax.Build/Build/Plugins/VisualScriptingPlugin.cs b/Source/Tools/Flax.Build/Build/Plugins/VisualScriptingPlugin.cs index 8ebe13518..ecfd97d88 100644 --- a/Source/Tools/Flax.Build/Build/Plugins/VisualScriptingPlugin.cs +++ b/Source/Tools/Flax.Build/Build/Plugins/VisualScriptingPlugin.cs @@ -22,7 +22,7 @@ namespace Flax.Build.Plugins private void OnGenerateCppScriptWrapperFunction(Builder.BuildData buildData, ClassInfo classInfo, FunctionInfo functionInfo, int scriptVTableSize, int scriptVTableIndex, StringBuilder contents) { - // Generate C++ wrapper function to invoke Visual Script instead of overriden native function (with support for base method callback) + // Generate C++ wrapper function to invoke Visual Script instead of overridden native function (with support for base method callback) BindingsGenerator.CppIncludeFiles.Add("Engine/Content/Assets/VisualScript.h"); diff --git a/Source/Tools/Flax.Build/Build/Target.cs b/Source/Tools/Flax.Build/Build/Target.cs index b7a6b2fbe..ebf1d36c9 100644 --- a/Source/Tools/Flax.Build/Build/Target.cs +++ b/Source/Tools/Flax.Build/Build/Target.cs @@ -225,7 +225,7 @@ namespace Flax.Build } /// - /// Setups the target building environment (native C++). Allows to modify compiler and linker options. Options applied here are used by all modules included into this target (can be overriden per module). + /// Setups the target building environment (native C++). Allows to modify compiler and linker options. Options applied here are used by all modules included into this target (can be overridden per module). /// /// The build options. public virtual void SetupTargetEnvironment(BuildOptions options) diff --git a/Source/Tools/Flax.Stats/CodeFrameNode.cs b/Source/Tools/Flax.Stats/CodeFrameNode.cs index 25d326ff4..e42bdcfef 100644 --- a/Source/Tools/Flax.Stats/CodeFrameNode.cs +++ b/Source/Tools/Flax.Stats/CodeFrameNode.cs @@ -75,14 +75,14 @@ namespace Flax.Stats /// /// Gets total amount of memory used by that node and all child nodes /// - public long TotaSizeOnDisk + public long TotalSizeOnDisk { get { long result = SizeOnDisk; for (int i = 0; i < Children.Length; i++) { - result += Children[i].TotaSizeOnDisk; + result += Children[i].TotalSizeOnDisk; } return result; } @@ -153,15 +153,15 @@ namespace Flax.Stats /// /// Gets total amount of lines of code per language /// - /// Language + /// Language /// Result amount of lines - public long GetTotalLinesOfCode(Languages languge) + public long GetTotalLinesOfCode(Languages language) { long result = 0; - result += LinesOfCode[(int)languge]; + result += LinesOfCode[(int)language]; for (int i = 0; i < Children.Length; i++) { - result += Children[i].GetTotalLinesOfCode(languge); + result += Children[i].GetTotalLinesOfCode(language); } return result; } @@ -270,9 +270,9 @@ namespace Flax.Stats public void CleanupDirectories() { - var chld = Children.ToList(); - chld.RemoveAll(e => ignoredFolders.Contains(e.ShortName.ToLower())); - Children = chld.ToArray(); + var child = Children.ToList(); + child.RemoveAll(e => ignoredFolders.Contains(e.ShortName.ToLower())); + Children = child.ToArray(); foreach (var a in Children) { diff --git a/Source/Tools/Flax.Stats/Tools.cs b/Source/Tools/Flax.Stats/Tools.cs index d947ae758..1e3ba1f74 100644 --- a/Source/Tools/Flax.Stats/Tools.cs +++ b/Source/Tools/Flax.Stats/Tools.cs @@ -103,7 +103,7 @@ namespace Flax.Stats } /// - /// Write string in UTF-8 encoding to the stream and ofset data + /// Write string in UTF-8 encoding to the stream and offset data /// /// File stream /// Data to write @@ -292,7 +292,7 @@ namespace Flax.Stats } /// - /// Write arry of Guids to the stream + /// Write array of Guids to the stream /// /// File stream /// Value to write