From 3923e6088c669b2cbf9cfb4658b78536ea2242f3 Mon Sep 17 00:00:00 2001
From: Eric Duminil <eric.duminil@gmail.com>
Date: Sat, 26 Dec 2020 23:14:38 +0100
Subject: [PATCH] Pass by reference

---
 lorawan.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lorawan.cpp b/lorawan.cpp
index 9bf7476..9dc37ff 100644
--- a/lorawan.cpp
+++ b/lorawan.cpp
@@ -183,7 +183,7 @@ namespace lorawan {
     }
   }
 
-  void preparePayloadIfTimeHasCome(int16_t co2, float temperature, float humidity) {
+  void preparePayloadIfTimeHasCome(const int16_t &co2, const float &temperature, const float &humidity) {
     static unsigned long last_sent_at = 0;
     unsigned long now = seconds();
     if (now - last_sent_at > config::lorawan_sending_interval) {
-- 
GitLab