Skip to content

Commit

Permalink
Remove iostream includes and uses (wpilibsuite#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Feb 8, 2022
1 parent da15194 commit 7e92eeb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <sys/stat.h>

#include <algorithm>
#include <iostream>
#include <stdexcept>

#include <libssh/libssh.h>
Expand Down
4 changes: 2 additions & 2 deletions sysid-projects/drive/src/main/cpp/Robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <algorithm>
#include <cstddef>
#include <cstdio>
#include <exception>
#include <iostream>
#include <string>
#include <string_view>

Expand Down Expand Up @@ -92,7 +92,7 @@ Robot::Robot() : frc::TimedRobot(5_ms) {
std::exit(-1);
}
m_logger.UpdateThreadPriority();
std::cout.flush();
std::fflush(stdout);

#ifdef INTEGRATION
frc::SmartDashboard::PutBoolean("SysIdRun", false);
Expand Down
4 changes: 2 additions & 2 deletions sysid-projects/mechanism/src/main/cpp/Robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "Robot.h"

#include <cstddef>
#include <cstdio>
#include <exception>
#include <iostream>
#include <string>

#include <fmt/format.h>
Expand Down Expand Up @@ -59,7 +59,7 @@ Robot::Robot() : frc::TimedRobot(5_ms) {
fmt::print("Project failed: {}\n", e.what());
std::exit(-1);
}
std::cout.flush();
std::fflush(stdout);
#ifdef INTEGRATION
frc::SmartDashboard::PutBoolean("SysIdRun", false);
// TODO use std::exit or EndCompetition once CTRE bug is fixed
Expand Down

0 comments on commit 7e92eeb

Please sign in to comment.