Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/AdvancedSubscribe.cpp (1 of 39 files). Show all
Unified · Split
| @@ -205,7 +205,7 @@ void ProcessMeasurements(DataSubscriber* source, vector<Measurement> newMeasurem · 204 unmodified lines | |||
| 205 | { | 205 | { |
| 206 | cout << Subscriber.GetTotalMeasurementsReceived() << " measurements received so far..." << endl; | 206 | cout << Subscriber.GetTotalMeasurementsReceived() << " measurements received so far..." << endl; |
| 207 | 207 | ||
| 208 | if (newMeasurements.size() > 0) | 208 | if (!newMeasurements.empty()) |
| 209 | { | 209 | { |
| 210 | if (TicksToString(timestamp, MaxTimestampSize, TimestampFormat, newMeasurements[0].Timestamp)) | 210 | if (TicksToString(timestamp, MaxTimestampSize, TimestampFormat, newMeasurements[0].Timestamp)) |
| 211 | cout << "Timestamp: " << string(timestamp) << endl; | 211 | cout << "Timestamp: " << string(timestamp) << endl; |
| @@ -238,13 +238,13 @@ void Resubscribe(DataSubscriber* source) · 26 unmodified lines | |||
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | // Callback which is called to display status messages from the subscriber. | 240 | // Callback which is called to display status messages from the subscriber. |
| 241 | void DisplayStatusMessage(DataSubscriber* source, string message) | 241 | void DisplayStatusMessage(DataSubscriber* source, const string& message) |
| 242 | { | 242 | { |
| 243 | cout << message << endl << endl; | 243 | cout << message << endl << endl; |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | // Callback which is called to display error messages from the connector and subscriber. | 246 | // Callback which is called to display error messages from the connector and subscriber. |
| 247 | void DisplayErrorMessage(DataSubscriber* source, string message) | 247 | void DisplayErrorMessage(DataSubscriber* source, const string& message) |
| 248 | { | 248 | { |
| 249 | cerr << message << endl << endl; | 249 | cerr << message << endl << endl; |
| 250 | } | 250 | } |