Skip to content

Commit

Permalink
ToString correction
Browse files Browse the repository at this point in the history
Co-Authored-By: Sam Vanheer <5501383+samvanheer@users.noreply.github.com>
  • Loading branch information
Mikk155 and SamVanheer committed Apr 7, 2024
1 parent bae9784 commit 920fbd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game/server/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ class Vector2D
}
}

[[nodiscard]] const char* ToString() const
[[nodiscard]] std::string ToString() const
{
return std::string( std::to_string( x ) + " " + std::to_string( y ) ).c_str();
return fmt::format("{} {}", x, y );

Check failure on line 58 in src/game/server/vector.h

View workflow job for this annotation

GitHub Actions / Linux-x86

‘fmt’ has not been declared
}

vec_t x = 0, y = 0;
Expand Down Expand Up @@ -115,9 +115,9 @@ class Vector // same data-layout as engine's vec3_t,
return Vector(x * flLen, y * flLen, z * flLen);
}

[[nodiscard]] const char* ToString() const
[[nodiscard]] std::string ToString() const
{
return std::string( std::to_string( x ) + " " + std::to_string( y ) + " " + std::to_string( z ) ).c_str();
return fmt::format("{} {} {}", x, y, z);

Check failure on line 120 in src/game/server/vector.h

View workflow job for this annotation

GitHub Actions / Linux-x86

‘fmt’ has not been declared
}

[[nodiscard]] constexpr Vector2D Make2D() const
Expand Down

0 comments on commit 920fbd1

Please sign in to comment.