Skip to content

Commit 8db0811

Browse files
committed
Don't include ostream in rdcstr.h
* It's only needed for renderdoccmd and catch tests, so define it locally where needed.
1 parent f42d718 commit 8db0811

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

renderdoc/3rdparty/catch/catch.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434

3535
#include "official/catch.hpp"
3636

37+
inline std::ostream &operator<<(std::ostream &os, rdcstr const &str)
38+
{
39+
return os << str.c_str();
40+
}
41+
3742
namespace Catch
3843
{
3944
template <>

renderdoc/api/replay/rdcstr.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
#pragma once
2626

27-
#include <ostream>
2827
#include <string>
2928

3029
// special type for storing literals. This allows functions to force callers to pass them literals
@@ -769,11 +768,6 @@ inline bool operator!=(const std::string &left, const rdcstr &right)
769768
return right != left;
770769
}
771770

772-
inline std::ostream &operator<<(std::ostream &os, rdcstr const &str)
773-
{
774-
return os << str.c_str();
775-
}
776-
777771
#if defined(RENDERDOC_QT_COMPAT)
778772
inline rdcstr operator+(const QString &left, const rdcstr &right)
779773
{

renderdoccmd/renderdoccmd.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ rdcstr DoStringise(const uint32_t &el)
3939
return oss.str();
4040
}
4141

42+
inline std::ostream &operator<<(std::ostream &os, rdcstr const &str)
43+
{
44+
return os << str.c_str();
45+
}
46+
4247
#include <replay/renderdoc_tostr.inl>
4348

4449
bool usingKillSignal = false;

0 commit comments

Comments
 (0)