Skip to content

Commit

Permalink
refactor: PredefinedTypeAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Pd233 committed May 9, 2024
1 parent 4dced29 commit 5feabbd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Generation/PredefinedTypeAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Hosihikari.NativeInterop.Generation;
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)]
public sealed class PredefinedTypeAttribute : Attribute
{
public string TypeName { get; set; } = string.Empty;
public required string TypeName { get; set; }

public bool IgnoreTemplateArgs { get; set; } = false;
}
2 changes: 1 addition & 1 deletion src/Unmanaged/STL/StdString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Hosihikari.NativeInterop.Unmanaged.STL;

[SupportedOSPlatform("windows")]
[PredefinedType(TypeName = "basic_string<char, struct std::char_traits<char>, class std::allocator<char>>")]
[PredefinedType(TypeName = "class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>")]
[StructLayout(LayoutKind.Sequential)]
public unsafe struct StdString : IDisposable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Unmanaged/STL/StdStringView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Hosihikari.NativeInterop.Unmanaged.STL;

[PredefinedType(TypeName = "class basic_string_view<char, struct std::char_traits<char>>")]
[PredefinedType(TypeName = "class std::basic_string_view<char, struct std::char_traits<char>>")]
[StructLayout(LayoutKind.Sequential)]
public unsafe struct StdStringView
{
Expand Down

0 comments on commit 5feabbd

Please sign in to comment.