Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to support building on MacOS clang (catalina) #25

Merged
merged 2 commits into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 3.8)
project (budgetwarrier)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_INSTALL_PREFIX /usr/local)
Expand All @@ -11,6 +11,8 @@ set(warnings "-Wall -Wextra -Werror")
find_package(OpenSSL REQUIRED)

include_directories(include)
include_directories(loguru)
include_directories(fmt/include)
include_directories(cpp-httplib)
include_directories(${OPENSSL_INCLUDE_DIR})

Expand Down
1 change: 1 addition & 0 deletions include/data_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "objectives.hpp"
#include "expenses.hpp"
#include "wishes.hpp"
#include "unordered_map"
robromano marked this conversation as resolved.
Show resolved Hide resolved

namespace budget {

Expand Down
1 change: 1 addition & 0 deletions include/objectives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <vector>
#include <string>
#include <map>
#include <array>

#include "module_traits.hpp"
#include "money.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/budget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string>
#include <iostream>
#include <tuple>
#include <unordered_map>

#include "cpp_utils/tmp.hpp"

Expand Down
1 change: 1 addition & 0 deletions src/currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <tuple>
#include <utility>
#include <iostream>
#include <unordered_map>

#include "currency.hpp"
#include "assets.hpp" // For get_default_currency
Expand Down
1 change: 1 addition & 0 deletions src/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//=======================================================================

#include <charconv>
#include <array>

#include "data.hpp"
#include "utils.hpp"
Expand Down
18 changes: 9 additions & 9 deletions src/fortune.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ void budget::status_fortunes(budget::writer& w, bool short_view){
contents.push_back({"", to_string(fortune.check_date), to_string(fortune.amount), "", "", "", "", "", "::edit::fortunes::" + budget::to_string(fortune.id)});
}
} else if (i == 1) {
auto diff = fortune.amount - previous;
auto d = fortune.check_date - previous_date;
auto avg = diff / d;
money diff = fortune.amount - previous;
long d = fortune.check_date - previous_date;
money avg = diff / d;
wichtounet marked this conversation as resolved.
Show resolved Hide resolved

if (short_view) {
contents.push_back({to_string(previous_date), to_string(fortune.check_date), to_string(fortune.amount),
Expand All @@ -111,13 +111,13 @@ void budget::status_fortunes(budget::writer& w, bool short_view){
format_money(diff), to_string(d), to_string(avg), "", "", "::edit::fortunes::" + budget::to_string(fortune.id)});
}
} else {
auto diff = fortune.amount - previous;
auto d = fortune.check_date - previous_date;
auto avg = diff / d;
money diff = fortune.amount - previous;
long d = fortune.check_date - previous_date;
money avg = diff / d;

auto tot_diff = fortune.amount - first;
auto tot_d = fortune.check_date - first_date;
auto tot_avg = tot_diff / tot_d;
money tot_diff = fortune.amount - first;
long tot_d = fortune.check_date - first_date;
money tot_avg = tot_diff / tot_d;

if (short_view) {
contents.push_back({to_string(previous_date), to_string(fortune.check_date), to_string(fortune.amount),
Expand Down
1 change: 1 addition & 0 deletions src/money.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <stdexcept>
#include <random>
#include <charconv>
#include <array>

#include "money.hpp"
#include "utils.hpp"
Expand Down