Skip to content

Commit df623ee

Browse files
committed
Remove unncessary <iostream> includes
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. Signed-off-by: Jeremy Nimmer <jeremy.nimmer@tri.global>
1 parent 551cb99 commit df623ee

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

include/sdf/Error.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
#ifndef SDF_ERROR_HH_
1818
#define SDF_ERROR_HH_
1919

20-
#include <iostream>
21-
#include <string>
2220
#include <optional>
21+
#include <ostream>
22+
#include <string>
2323
#include <gz/utils/ImplPtr.hh>
2424
#include <sdf/sdf_config.h>
2525
#include "sdf/Console.hh"

include/sdf/Exception.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#define SDF_EXCEPTION_HH_
2020

2121
#include <cstdint>
22-
#include <iostream>
2322
#include <memory>
23+
#include <ostream>
2424
#include <sstream>
2525
#include <string>
2626

src/Console.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include <cstdlib>
19+
#include <iostream>
1920
#include <memory>
2021
#include <mutex>
2122
#include <sstream>

src/Element.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include <algorithm>
19+
#include <iostream>
1920
#include <sstream>
2021
#include <string>
2122

src/FrameSemantics.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717
#include <algorithm>
18+
#include <iostream>
1819
#include <string>
1920
#include <set>
2021
#include <utility>

src/SDF.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717

1818
#include <cstdlib>
1919
#include <fstream>
20-
#include <sstream>
2120
#include <functional>
21+
#include <iostream>
2222
#include <list>
2323
#include <map>
24+
#include <sstream>
2425
#include <string>
2526
#include <vector>
2627

0 commit comments

Comments
 (0)