From f4afc04ee7a085a89ad84ba89344bb50ca9e6e04 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 21 Jun 2015 12:27:48 +0200 Subject: o Trying to make the Bluetooth API more C++ idiomatic, a GATT connection has the same lifecycle as a BluetoothGatt. sm-get-value: o Better error handling. --- sensor/include/trygvis/sensor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sensor') diff --git a/sensor/include/trygvis/sensor.h b/sensor/include/trygvis/sensor.h index bcbd43b..48fb509 100644 --- a/sensor/include/trygvis/sensor.h +++ b/sensor/include/trygvis/sensor.h @@ -184,10 +184,12 @@ public: return values.at(index); } - void set(const SampleKey *key, const std::string &value) { + SampleRecord& set(const SampleKey *key, const std::string &value) { values.resize(max(values.size(), key->index + 1)); values.at(key->index).reset(value); + + return *this; } template -- cgit v1.2.3