Fix constants being created constantly
That code isn't intended to be realtime, so running it every loop
iteration is a bad idea.
Change-Id: Id6e00fc2eedfb50caa56bce9416c11b26a3d3cd7
diff --git a/y2018/constants.cc b/y2018/constants.cc
index 90e4441..833353d 100644
--- a/y2018/constants.cc
+++ b/y2018/constants.cc
@@ -138,7 +138,10 @@
} // namespace
-const Values &GetValues() { return DoGetValues(); }
+const Values &GetValues() {
+ static const Values r = DoGetValues();
+ return r;
+}
const Values &GetValuesForTeam(uint16_t team_number) {
static ::aos::Mutex mutex;