mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 19:45:13 +00:00
5d08e9b495
* hos: Cleanup the project Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more. This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable. * Address gdkchan feedback * addresses Thog feedback * Revert ElfSymbol
15 lines
No EOL
505 B
C#
15 lines
No EOL
505 B
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace Ryujinx.HLE.Exceptions
|
|
{
|
|
public class InvalidStructLayoutException<T> : Exception
|
|
{
|
|
static readonly Type _structType = typeof(T);
|
|
|
|
public InvalidStructLayoutException(string message) : base(message) { }
|
|
|
|
public InvalidStructLayoutException(int expectedSize)
|
|
: base($"Type {_structType.Name} has the wrong size. Expected: {expectedSize} bytes, got: {Unsafe.SizeOf<T>()} bytes") { }
|
|
}
|
|
} |