From 8db0811678dc7df9e9bbcef3aa50280aa3b463bc Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 2 Dec 2019 11:15:07 +0000 Subject: [PATCH] Don't include ostream in rdcstr.h * It's only needed for renderdoccmd and catch tests, so define it locally where needed. --- renderdoc/3rdparty/catch/catch.hpp | 5 +++++ renderdoc/api/replay/rdcstr.h | 6 ------ renderdoccmd/renderdoccmd.cpp | 5 +++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/renderdoc/3rdparty/catch/catch.hpp b/renderdoc/3rdparty/catch/catch.hpp index 83b207457..3907b29d3 100644 --- a/renderdoc/3rdparty/catch/catch.hpp +++ b/renderdoc/3rdparty/catch/catch.hpp @@ -34,6 +34,11 @@ #include "official/catch.hpp" +inline std::ostream &operator<<(std::ostream &os, rdcstr const &str) +{ + return os << str.c_str(); +} + namespace Catch { template <> diff --git a/renderdoc/api/replay/rdcstr.h b/renderdoc/api/replay/rdcstr.h index 7d52c6dad..acb025a4c 100644 --- a/renderdoc/api/replay/rdcstr.h +++ b/renderdoc/api/replay/rdcstr.h @@ -24,7 +24,6 @@ #pragma once -#include #include // 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) return right != left; } -inline std::ostream &operator<<(std::ostream &os, rdcstr const &str) -{ - return os << str.c_str(); -} - #if defined(RENDERDOC_QT_COMPAT) inline rdcstr operator+(const QString &left, const rdcstr &right) { diff --git a/renderdoccmd/renderdoccmd.cpp b/renderdoccmd/renderdoccmd.cpp index c7987d427..09ab3bbbd 100644 --- a/renderdoccmd/renderdoccmd.cpp +++ b/renderdoccmd/renderdoccmd.cpp @@ -39,6 +39,11 @@ rdcstr DoStringise(const uint32_t &el) return oss.str(); } +inline std::ostream &operator<<(std::ostream &os, rdcstr const &str) +{ + return os << str.c_str(); +} + #include bool usingKillSignal = false;