Skip to content

Commit

Permalink
Remove unncessary <iostream> includes (#582)
Browse files Browse the repository at this point in the history
Including iostream means introducing the static (global) constructors
and destructors for std::cin, std::cerr, and std::cout. That extra
init and fini code is undesirable when those streams are not actually
used.
  • Loading branch information
jwnimmer-tri authored Dec 31, 2024
1 parent e414622 commit 9128062
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/algs/ags/solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Copyright (C) 2018 Sovrasov V. - All Rights Reserved

#include <algorithm>
#include <cmath>
#include <iostream>

using namespace ags;

Expand Down Expand Up @@ -300,7 +299,6 @@ void NLPSolver::CalculateNextPoints()

if (mNextPoints[i].x >= mNextIntervals[i]->pr.x || mNextPoints[i].x <= mNextIntervals[i]->pl.x)
mNeedStop = true;
//std::cout << "Warning: resolution of evolvent is not enough to continue the search";

mEvolvent.GetImage(mNextPoints[i].x, mNextPoints[i].y);
}
Expand Down
2 changes: 1 addition & 1 deletion src/algs/stogo/linalg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
No attempt is made to check if the function arguments are valid
*/

#include <iostream>
#include <ostream>
#include <cmath> // for sqrt()

#include "linalg.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algs/stogo/linalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef LINALG_H
#define LINALG_H

#include <iostream>
#include <ostream>
using namespace std;
#include <cmath> // for sqrt()
#include <cfloat>
Expand Down
2 changes: 1 addition & 1 deletion src/algs/stogo/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define TOOLS_H

#include <cfloat>
#include <iostream>
#include <ostream>

#include <algorithm>
#include <iterator>
Expand Down

0 comments on commit 9128062

Please sign in to comment.