Fix copyright lines
[folly.git] / folly / stats / MultiLevelTimeSeries-defs.h
index 02694a536b034bccebb2cf8f39fa95a72caca798..fb29de12a8b22cb3298d0cdd1f737b6869697c17 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2013-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -74,15 +74,15 @@ template <typename VT, typename CT>
 void MultiLevelTimeSeries<VT, CT>::addValue(
     TimePoint now,
     const ValueType& val,
-    int64_t times) {
-  addValueAggregated(now, val * times, times);
+    uint64_t times) {
+  addValueAggregated(now, val * ValueType(times), times);
 }
 
 template <typename VT, typename CT>
 void MultiLevelTimeSeries<VT, CT>::addValueAggregated(
     TimePoint now,
     const ValueType& total,
-    int64_t nsamples) {
+    uint64_t nsamples) {
   if (cachedTime_ != now) {
     flush();
     cachedTime_ = now;
@@ -113,7 +113,7 @@ void MultiLevelTimeSeries<VT, CT>::flush() {
 
 template <typename VT, typename CT>
 void MultiLevelTimeSeries<VT, CT>::clear() {
-  for (auto & level : levels_) {
+  for (auto& level : levels_) {
     level.clear();
   }
 
@@ -122,4 +122,4 @@ void MultiLevelTimeSeries<VT, CT>::clear() {
   cachedCount_ = 0;
 }
 
-}  // folly
+} // namespace folly