Skip to content

Commit

Permalink
Fix Linux compile errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysgoldstein committed Nov 23, 2018
1 parent 783128a commit c3999bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sydevs/systems/interactive_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ duration interactive_system<AgentID, Node, InjData, ObsData>::macro_planned_even
{
++frame_index_;
planned_dt_ = macro_planned_update(elapsed_dt, injection_, observation_);
if (planned_dt_ <= 0_s) throw std::logic_error("Planned duration between interact events in interactive system (" + full_name() + ") must be positive.");
if (planned_dt_ <= 0_s) throw std::logic_error("Planned duration between interact events in interactive system (" + this->full_name() + ") must be positive.");
return planned_dt_;
}

Expand Down
2 changes: 1 addition & 1 deletion src/sydevs/systems/real_time_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void real_time_buffer::recompute_planned_clock_duration()
auto syn_planned_sim_dt = current_sim_t_.gap(syn_sim_t_) + planned_sim_dt_;
auto syn_planned_clk_t = syn_clk_t_ + std::chrono::milliseconds(int64((syn_planned_sim_dt/t_adv_rate_)/1_ms));
float64 syn_planned_clk_dt = std::chrono::duration_cast<std::chrono::milliseconds>(syn_planned_clk_t - current_clk_t_).count();
if (abs(syn_planned_clk_dt - planned_clk_dt_) >= 2.0) {
if (std::abs(syn_planned_clk_dt - planned_clk_dt_) >= 2.0) {
++syn_count_;
float64 limited_clk_dt = planned_clk_dt_;
if (syn_planned_clk_dt > planned_clk_dt_) {
Expand Down

0 comments on commit c3999bb

Please sign in to comment.