Skip to content

Commit 60e4d5e

Browse files
committed
Remove GetGlobalOrDefault
1 parent 60ec3a7 commit 60e4d5e

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

src/Laylua/Library/Lua.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -261,39 +261,6 @@ public TValue GetGlobal<TValue>(ReadOnlySpan<char> name)
261261
}
262262
}
263263

264-
/// <inheritdoc cref="LuaReference._reference"/>
265-
/// <summary>
266-
/// Gets the value of a global variable.
267-
/// </summary>
268-
/// <param name="name"> The name of the global variable. </param>
269-
/// <typeparam name="TValue"> The type of the value. </typeparam>
270-
/// <returns>
271-
/// The value of the global variable or <see langword="default"/>.
272-
/// </returns>
273-
[MethodImpl(MethodImplOptions.NoInlining)]
274-
public TValue? GetGlobalOrDefault<TValue>(ReadOnlySpan<char> name)
275-
where TValue : notnull
276-
{
277-
return TryGetGlobal<TValue>(name, out var value) ? value : default;
278-
}
279-
280-
/// <inheritdoc cref="LuaReference._reference"/>
281-
/// <summary>
282-
/// Gets the value of a global variable.
283-
/// </summary>
284-
/// <param name="name"> The name of the global variable. </param>
285-
/// <param name="defaultValue"> The default value to return. </param>
286-
/// <typeparam name="TValue"> The type of the value. </typeparam>
287-
/// <returns>
288-
/// The value from the table or <paramref name="defaultValue"/>.
289-
/// </returns>
290-
[MethodImpl(MethodImplOptions.NoInlining)]
291-
public TValue? GetGlobalOrDefault<TValue>(ReadOnlySpan<char> name, TValue defaultValue)
292-
where TValue : notnull
293-
{
294-
return TryGetGlobal<TValue>(name, out var value) ? value : defaultValue;
295-
}
296-
297264
/// <summary>
298265
/// Sets the value of a global variable.
299266
/// </summary>

0 commit comments

Comments
 (0)