Skip to content

Commit

Permalink
Add spacing to operator [ ]
Browse files Browse the repository at this point in the history
  • Loading branch information
redorav committed Aug 19, 2022
1 parent 9903615 commit 6f72235
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/hlsl++_matrix_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ namespace hlslpp
hlslpp_assert(N >= 0 && N <= 2);
return *(&row0 + N);
}

const float3& operator[](int N) const
{
hlslpp_assert(N >= 0 && N <= 2);
Expand Down Expand Up @@ -559,6 +560,7 @@ namespace hlslpp
hlslpp_assert(N >= 0 && N <= 3);
return *(&row0 + N);
}

const float4& operator[](int N) const
{
hlslpp_assert(N >= 0 && N <= 3);
Expand Down Expand Up @@ -674,6 +676,7 @@ namespace hlslpp
hlslpp_assert(N >= 0 && N <= 3);
return *(& row0 + N);
}

const float4& operator[](int N) const
{
hlslpp_assert(N >= 0 && N <= 3);
Expand Down
4 changes: 4 additions & 0 deletions include/hlsl++_vector_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ namespace hlslpp
hlslpp_assert(N == 0);
return f32[N];
}

const float& operator[](int N) const
{
hlslpp_assert(N == 0);
Expand Down Expand Up @@ -848,6 +849,7 @@ namespace hlslpp
hlslpp_assert(N >= 0 && N <= 1);
return f32[N];
}

const float& operator[](int N) const
{
hlslpp_assert(N >= 0 && N <= 1);
Expand Down Expand Up @@ -901,6 +903,7 @@ namespace hlslpp
hlslpp_assert(N >= 0 && N <= 2);
return f32[N];
}

const float& operator[](int N) const
{
hlslpp_assert(N >= 0 && N <= 2);
Expand Down Expand Up @@ -964,6 +967,7 @@ namespace hlslpp
hlslpp_assert(N >= 0 && N <= 3);
return f32[N];
}

const float& operator[](int N) const
{
hlslpp_assert(N >= 0 && N <= 3);
Expand Down

0 comments on commit 6f72235

Please sign in to comment.