mirror of
https://github.com/SFML/SFML.git
synced 2025-02-23 14:56:02 +08:00
Always use typename
with templates
This commit is contained in:
parent
3fa47911f9
commit
5f9c9fc4f8
@ -49,13 +49,13 @@ inline CGFloat getDefaultScaleFactor()
|
|||||||
/// \param delegate an object implementing WindowImplDelegateProtocol, or nil for default scale
|
/// \param delegate an object implementing WindowImplDelegateProtocol, or nil for default scale
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
template <class T>
|
template <typename T>
|
||||||
void scaleIn(T& in, id<WindowImplDelegateProtocol> delegate)
|
void scaleIn(T& in, id<WindowImplDelegateProtocol> delegate)
|
||||||
{
|
{
|
||||||
in /= static_cast<T>(delegate ? [delegate displayScaleFactor] : getDefaultScaleFactor());
|
in /= static_cast<T>(delegate ? [delegate displayScaleFactor] : getDefaultScaleFactor());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <typename T>
|
||||||
void scaleInXY(T& in, id<WindowImplDelegateProtocol> delegate)
|
void scaleInXY(T& in, id<WindowImplDelegateProtocol> delegate)
|
||||||
{
|
{
|
||||||
scaleIn(in.x, delegate);
|
scaleIn(in.x, delegate);
|
||||||
@ -69,13 +69,13 @@ void scaleInXY(T& in, id<WindowImplDelegateProtocol> delegate)
|
|||||||
/// \param delegate an object implementing WindowImplDelegateProtocol, or nil for default scale
|
/// \param delegate an object implementing WindowImplDelegateProtocol, or nil for default scale
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
template <class T>
|
template <typename T>
|
||||||
void scaleOut(T& out, id<WindowImplDelegateProtocol> delegate)
|
void scaleOut(T& out, id<WindowImplDelegateProtocol> delegate)
|
||||||
{
|
{
|
||||||
out *= static_cast<T>(delegate ? [delegate displayScaleFactor] : getDefaultScaleFactor());
|
out *= static_cast<T>(delegate ? [delegate displayScaleFactor] : getDefaultScaleFactor());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <typename T>
|
||||||
void scaleOutXY(T& out, id<WindowImplDelegateProtocol> delegate)
|
void scaleOutXY(T& out, id<WindowImplDelegateProtocol> delegate)
|
||||||
{
|
{
|
||||||
scaleOut(out.x, delegate);
|
scaleOut(out.x, delegate);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user