Skip to content

Commit

Permalink
Merge pull request #1294 from TheROPFather/develop
Browse files Browse the repository at this point in the history
Fix linux build
  • Loading branch information
TheROPFather authored Mar 4, 2024
2 parents 3e4c611 + 972f1f1 commit f8a60c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Etterna/Models/HighScore/Replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ Replay::LoadInputData(const std::string& replayDir) -> bool
auto* hs = GetHighScore();
if (hs != nullptr) {
const static auto delta = 0.001F;
if (std::fabsf(fMusicRate - hs->GetMusicRate()) > delta) {
if (fabsf(fMusicRate - hs->GetMusicRate()) > delta) {
Locator::getLogger()->error(
"There is a discrepancy in the rate of replay {} - HS rate "
"{} - replay rate {}",
Expand Down
4 changes: 2 additions & 2 deletions src/Etterna/Singletons/DownloadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,7 @@ DownloadManager::RefreshGoals(const DateTime start, const DateTime end)
for (auto& localGoal : localGoalsForChart) {
// if the goal is found
// either save or do nothing
if (std::fabsf(goal.rate - localGoal.rate) < 0.001) {
if (fabsf(goal.rate - localGoal.rate) < 0.001) {
if (goal.achieved && !localGoal.achieved &&
goal.timeassigned >= localGoal.timeassigned) {
Locator::getLogger()->info(
Expand Down Expand Up @@ -2586,7 +2586,7 @@ DownloadManager::RefreshGoals(const DateTime start, const DateTime end)
for (auto& onlineGoal : onlineGoalsForChart) {
// if the goal is found
// either update or do nothing
if (std::fabsf(goal.rate - onlineGoal.rate) < 0.001) {
if (fabsf(goal.rate - onlineGoal.rate) < 0.001) {
if (goal.achieved && !onlineGoal.achieved &&
goal.timeassigned >= onlineGoal.timeassigned) {
Locator::getLogger()->info(
Expand Down
3 changes: 2 additions & 1 deletion src/Etterna/Singletons/DownloadManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <deque>
#include <unordered_set>
#include <unordered_map>
#include <math.h>

class ScoreGoal;
class DownloadablePack;
Expand Down Expand Up @@ -194,7 +195,7 @@ class DownloadablePackPagination

// number of pages, so "1" has only a page "0"
int getTotalPages() {
return static_cast<int>(std::ceilf(static_cast<float>(key.perPage) /
return static_cast<int>(ceilf(static_cast<float>(key.perPage) /
static_cast<float>(totalEntries)));
}

Expand Down

0 comments on commit f8a60c6

Please sign in to comment.