Change return value of GetStats to a reference

This commit is contained in:
Ludvig Strigeus 2018-10-07 19:40:09 +02:00
parent e65f05d29a
commit fac3246d99
2 changed files with 2 additions and 2 deletions

View file

@ -96,7 +96,7 @@ void WireguardProcessor::SetHeaderObfuscation(const char *key) {
dev_.SetHeaderObfuscation(key);
}
WgProcessorStats WireguardProcessor::GetStats() {
const WgProcessorStats &WireguardProcessor::GetStats() {
// todo: only supports one peer but i want this in the ui for now.
stats_.endpoint.sin.sin_family = 0;
WgPeer *peer = dev_.first_peer();

View file

@ -88,7 +88,7 @@ public:
void SecondLoop();
WgProcessorStats GetStats();
const WgProcessorStats &GetStats();
void ResetStats();
bool Start();