szaszm commented on a change in pull request #892:
URL: https://github.com/apache/nifi-minifi-cpp/pull/892#discussion_r482943418



##########
File path: extensions/expression-language/Expression.cpp
##########
@@ -632,7 +632,9 @@ Value expr_toDate(const std::vector<Value> &args) {
 #endif  // EXPRESSION_LANGUAGE_USE_DATE
 
 Value expr_now(const std::vector<Value> &args) {
-  return 
Value(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
+  using namespace std::chrono;
+  int64_t unix_time_ms = 
duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();

Review comment:
       Please consider using direct-list-initialization to avoid narrowing 
implicit conversions.
   ```suggestion
     int64_t 
unix_time_ms{duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count()};
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to