Skip to content

Commit 62ffb91

Browse files
committed
Fix: getAddress() returns by value, use auto not auto&
1 parent f6962be commit 62ffb91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/listener.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ExampleListener {
2828
event.setJoinMessage(endstone::ColorFormat::Yellow + player.getName() + " joined the game");
2929

3030
// Log the player's network address (useful for debugging, not shown to players)
31-
auto &addr = player.getAddress();
31+
auto addr = player.getAddress();
3232
plugin_.getLogger().info("{} joined from {}:{}", player.getName(), addr.getHostname(), addr.getPort());
3333
}
3434

0 commit comments

Comments
 (0)