Skip to content

Commit

Permalink
Fix warning C4244 in MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
mogemimi committed Aug 27, 2018
1 parent c19e29b commit 23cf0f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion experimental/Pomdog.Experimental/UI/StackPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void StackPanel::OnPointerMoved(const PointerPoint& pointerPoint)

///@note recalculate position in current coordinate system
pointInView = UIHelper::ConvertToChildSpace(pointerPoint.Position, GetGlobalTransform());
position = Vector2(pointInView.X, pointInView.Y);
position = MathHelper::ToVector2(pointInView);
startTouchPoint = position;
}
}
Expand Down
5 changes: 3 additions & 2 deletions experimental/Pomdog.Experimental/UI/UIHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#pragma once

#include "Pomdog/Math/MathHelper.hpp"
#include "Pomdog/Math/Point2D.hpp"
#include "Pomdog/Math/Vector2.hpp"
#include "Pomdog/Math/Matrix3x2.hpp"
Expand All @@ -19,8 +20,8 @@ struct UIHelper {
static Point2D ConvertToChildSpace(
const Point2D& position, const Matrix3x2& transform)
{
auto positionInChild = ConvertToChildSpace(Vector2(position.X, position.Y), transform);
return Point2D(positionInChild.X, positionInChild.Y);
auto positionInChild = ConvertToChildSpace(MathHelper::ToVector2(position), transform);
return MathHelper::ToPoint2D(positionInChild);
}
};

Expand Down

0 comments on commit 23cf0f1

Please sign in to comment.