소스 검색

Update lib/ResourceSet.h

Use suggestion.

Co-authored-by: Ivan Savenko <[email protected]>

Xilmi 1 년 전
부모
커밋
07afb2d649
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      lib/ResourceSet.h

+ 1 - 2
lib/ResourceSet.h

@@ -159,8 +159,7 @@ public:
 				}
 				else {
 					// Calculate the number of times we need to accumulate income to fulfill the need
-					float divisionResult = static_cast<float>(container.at(i)) / static_cast<float>(income[i]);
-					int ceiledResult = static_cast<int>(std::ceil(divisionResult));
+					int ceiledResult = vstd::divideAndCeil(container.at(i), income[i]);
 					ret = std::max(ret, ceiledResult);
 				}
 			}