소스 검색

perf_stats: Resolve implicit int to double conversion error

We simply need to turn the literal argument to std::accumulate into a
double, rather than an int.
Lioncash 6 년 전
부모
커밋
75dec14f21
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/core/perf_stats.cpp

+ 1 - 1
src/core/perf_stats.cpp

@@ -81,7 +81,7 @@ double PerfStats::GetMeanFrametime() {
         return 0;
     }
     const double sum = std::accumulate(perf_history.begin() + IgnoreFrames,
-                                       perf_history.begin() + current_index, 0);
+                                       perf_history.begin() + current_index, 0.0);
     return sum / (current_index - IgnoreFrames);
 }