Skip to content

Commit

Permalink
made it so that workarounds would only run if the user is on an apple…
Browse files Browse the repository at this point in the history
… machine
  • Loading branch information
Farook authored and Farook committed Oct 22, 2021
1 parent 7f7eac9 commit eefe8f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/crow/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ namespace crow
res.end();
});

if (!router_.blueprints().empty()){
#if defined(__APPLE__) || defined(__MACH__)
if (!router_.blueprints().empty())
#endif
{
for (Blueprint* bp : router_.blueprints())
{
if (!bp->static_dir().empty())
Expand Down
8 changes: 8 additions & 0 deletions include/crow/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,11 @@ namespace crow
t_ = type::Object;
o = std::unique_ptr<object>(new object(initializer_list));
} else {
#if defined(__APPLE__) || defined(__MACH__)
o = std::unique_ptr<object>(new object(initializer_list));
#else
(*o) = initializer_list;
#endif
}
return *this;
}
Expand All @@ -1567,7 +1571,11 @@ namespace crow
t_ = type::Object;
o = std::unique_ptr<object>(new object(value));
} else {
#if defined(__APPLE__) || defined(__MACH__)
o = std::unique_ptr<object>(new object(value));
#else
(*o) = value;
#endif
}
return *this;
}
Expand Down

0 comments on commit eefe8f6

Please # to comment.