Clang: Inline EndMessage

Change-Id: Id24d5f786e5f47798c2d1a8e46081dfcd7f67913
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Marco Bubke
2016-07-19 11:35:03 +02:00
committed by Tim Jenssen
parent 48bb527607
commit df1a197aee
2 changed files with 20 additions and 22 deletions

View File

@@ -25,28 +25,12 @@
#include "cmbendmessage.h"
#include <QDataStream>
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDataStream &operator<<(QDataStream &out, const EndMessage &/*message*/)
{
return out;
}
QDataStream &operator>>(QDataStream &in, EndMessage &/*message*/)
{
return in;
}
bool operator==(const EndMessage &/*first*/, const EndMessage &/*second*/)
{
return true;
}
QDebug operator<<(QDebug debug, const EndMessage &/*message*/)
{
return debug.nospace() << "EndMessage()";

View File

@@ -26,17 +26,31 @@
#pragma once
#include "clangbackendipc_global.h"
#include <ostream>
#include <QDataStream>
#include <iosfwd>
namespace ClangBackEnd {
class CMBIPC_EXPORT EndMessage
class EndMessage
{
};
public:
friend QDataStream &operator<<(QDataStream &out, const EndMessage &/*message*/)
{
return out;
}
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const EndMessage &message);
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, EndMessage &message);
CMBIPC_EXPORT bool operator==(const EndMessage &first, const EndMessage &second);
friend QDataStream &operator>>(QDataStream &in, EndMessage &/*message*/)
{
return in;
}
friend bool operator==(const EndMessage &/*first*/, const EndMessage &/*second*/)
{
return true;
}
};
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const EndMessage &message);
void PrintTo(const EndMessage &message, ::std::ostream* os);