New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove draw line 2D helper method. #14531

Merged
merged 1 commit into from Dec 17, 2017

Conversation

Projects
None yet
3 participants
@RoosterDragon
Member

RoosterDragon commented Dec 16, 2017

Callers can provide 3D points easily, and this avoids the need to allocate and slow down enumeration via the points.Select(p => new float3(p, 0)) wrapper.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Dec 16, 2017

Member

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

CSC mods/common/OpenRA.Mods.Common.dll

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

Compilation failed: 4 error(s), 0 warnings

make: *** [mods/common/OpenRA.Mods.Common.dll] Error 1

Member

pchote commented Dec 16, 2017

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

CSC mods/common/OpenRA.Mods.Common.dll

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(57,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,8): error CS1502: The best overloaded method match for `OpenRA.Graphics.RgbaColorRenderer.DrawLine(OpenRA.float3, OpenRA.float3, float, System.Drawing.Color)' has some invalid arguments

/home/travis/build/OpenRA/OpenRA/OpenRA.Game.exe (Location of the symbol related to previous error)

OpenRA.Mods.Common/Graphics/SelectionBoxRenderable.cs(59,17): error CS1503: Argument #1' cannot convert OpenRA.float2[]' expression to type `OpenRA.float3'

Compilation failed: 4 error(s), 0 warnings

make: *** [mods/common/OpenRA.Mods.Common.dll] Error 1

Remove draw line 2D helper method.
Callers can provide 3D points easily, and this avoids the need to allocate and slow down enumeration via the points.Select(p => new float3(p, 0)) wrapper.
@pchote

pchote approved these changes Dec 16, 2017

@pchote pchote added the PR: Needs +2 label Dec 16, 2017

@pchote pchote added this to the Next release milestone Dec 16, 2017

@reaperrr reaperrr merged commit a9d1d37 into OpenRA:bleed Dec 17, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RoosterDragon RoosterDragon deleted the RoosterDragon:use-draw-line-3d branch Dec 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment