1
0
Fork 0

fix compile warnings about operator<< (#8456)

This commit is contained in:
Jan 2019-03-19 12:33:26 +01:00 committed by GitHub
parent 57da3a538b
commit 5dbd67c8fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 16 deletions

View File

@ -0,0 +1,46 @@
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2018-2018 ArangoDB GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
///
/// @author Jan Steemann
////////////////////////////////////////////////////////////////////////////////
#include "ExecutionState.h"
#include <ostream>
namespace arangodb {
namespace aql {
std::ostream& operator<<(std::ostream& ostream, ExecutionState state) {
switch (state) {
case ExecutionState::DONE:
ostream << "DONE";
break;
case ExecutionState::HASMORE:
ostream << "HASMORE";
break;
case ExecutionState::WAITING:
ostream << "WAITING";
break;
}
return ostream;
}
} // namespace aql
} // namespace arangodb

View File

@ -23,7 +23,7 @@
#ifndef ARANGOD_AQL_EXECUTION_STATE_H #ifndef ARANGOD_AQL_EXECUTION_STATE_H
#define ARANGOD_AQL_EXECUTION_STATE_H 1 #define ARANGOD_AQL_EXECUTION_STATE_H 1
#include <ostream> #include <iosfwd>
namespace arangodb { namespace arangodb {
namespace aql { namespace aql {
@ -42,20 +42,7 @@ enum class ExecutionState {
WAITING WAITING
}; };
inline std::ostream& operator<<(std::ostream& ostream, ExecutionState state) { std::ostream& operator<<(std::ostream& ostream, ExecutionState state);
switch (state) {
case ExecutionState::DONE:
ostream << "DONE";
break;
case ExecutionState::HASMORE:
ostream << "HASMORE";
break;
case ExecutionState::WAITING:
ostream << "WAITING";
break;
}
return ostream;
}
} // namespace aql } // namespace aql
} // namespace arangodb } // namespace arangodb

View File

@ -30,6 +30,8 @@
#include "Basics/StaticStrings.h" #include "Basics/StaticStrings.h"
#include "Basics/VelocyPackHelper.h" #include "Basics/VelocyPackHelper.h"
#include <ostream>
namespace { namespace {
std::string const TypeIllegal("illegal"); std::string const TypeIllegal("illegal");
std::string const TypeNone("none"); std::string const TypeNone("none");

View File

@ -24,7 +24,7 @@
#ifndef ARANGOD_AQL_INDEX_HINT_H #ifndef ARANGOD_AQL_INDEX_HINT_H
#define ARANGOD_AQL_INDEX_HINT_H 1 #define ARANGOD_AQL_INDEX_HINT_H 1
#include <iostream> #include <iosfwd>
#include <velocypack/Builder.h> #include <velocypack/Builder.h>
#include <velocypack/Slice.h> #include <velocypack/Slice.h>

View File

@ -214,6 +214,7 @@ SET(ARANGOD_SOURCES
Aql/ExecutionEngine.cpp Aql/ExecutionEngine.cpp
Aql/ExecutionNode.cpp Aql/ExecutionNode.cpp
Aql/ExecutionPlan.cpp Aql/ExecutionPlan.cpp
Aql/ExecutionState.cpp
Aql/ExecutionStats.cpp Aql/ExecutionStats.cpp
Aql/ExecutorExpressionContext.cpp Aql/ExecutorExpressionContext.cpp
Aql/ExecutorInfos.cpp Aql/ExecutorInfos.cpp