Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Scripts/Extensions/IListExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,9 @@ public static void Apply<T>( this IList<T> list, Func<T, T> func )
/// <summary>
/// 指定されたインデックスに要素が存在する場合に true を返します
/// </summary>
public static bool IsDefinedAt<T>( IList<T> self, int index )
public static bool IsDefinedAt<T>( this IList<T> self, int index )
{
return index < self.Count;
return index >= 0 && index < self.Count;
}
}
}