Optimize some code by manual inlining

This commit is contained in:
Wojtek Figat
2022-10-21 18:36:18 +02:00
parent b7b4391cff
commit 42d1f40b9c
6 changed files with 42 additions and 54 deletions

View File

@@ -54,16 +54,6 @@ public:
return _loadedLODs;
}
/// <summary>
/// Determines whether the specified index is a valid LOD index.
/// </summary>
/// <param name="index">The index.</param>
/// <returns>True if the specified index is a valid LOD index, otherwise false.</returns>
FORCE_INLINE bool IsValidLODIndex(int32 index) const
{
return Math::IsInRange(index, 0, LODs.Count() - 1);
}
/// <summary>
/// Clamps the index of the LOD to be valid for rendering (only loaded LODs).
/// </summary>
@@ -79,7 +69,7 @@ public:
/// </summary>
FORCE_INLINE int32 HighestResidentLODIndex() const
{
return GetLODsCount() - _loadedLODs;
return LODs.Count() - _loadedLODs;
}
/// <summary>

View File

@@ -55,16 +55,6 @@ public:
return _loadedLODs;
}
/// <summary>
/// Determines whether the specified index is a valid LOD index.
/// </summary>
/// <param name="index">The index.</param>
/// <returns>True if the specified index is a valid LOD index, otherwise false.</returns>
FORCE_INLINE bool IsValidLODIndex(int32 index) const
{
return Math::IsInRange(index, 0, LODs.Count() - 1);
}
/// <summary>
/// Clamps the index of the LOD to be valid for rendering (only loaded LODs).
/// </summary>
@@ -80,7 +70,7 @@ public:
/// </summary>
FORCE_INLINE int32 HighestResidentLODIndex() const
{
return GetLODsCount() - _loadedLODs;
return LODs.Count() - _loadedLODs;
}
/// <summary>