put include guards on boost/function

According to clang boost/function.hpp does not have include guards,
and from inspecting clang diagnostics we include it many times
in several compilation units. This commit adds an external include
guard to all of our includes of this header, it was made using

find . -type f -exec sed -i 's/^#include <boost\/function\.hpp>$/\n#ifndef I

and inspecting the results.
This commit is contained in:
Chris Beck 2014-06-19 13:58:58 -04:00
parent aabdd2969a
commit 8f0fe88635
24 changed files with 120 additions and 0 deletions

View file

@ -29,7 +29,12 @@
#include "../../log.hpp"
#include <boost/bind.hpp>
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <boost/foreach.hpp>
namespace ai {

View file

@ -21,7 +21,12 @@
#ifndef AI_COMPOSITE_PROPERTY_HANDLER_HPP_INCLUDED
#define AI_COMPOSITE_PROPERTY_HANDLER_HPP_INCLUDED
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <boost/foreach.hpp>
#include "config.hpp"

View file

@ -36,7 +36,12 @@
#include <boost/asio.hpp>
#include <boost/interprocess/smart_ptr/unique_ptr.hpp>
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include "../api/ana.hpp"
#include "asio_listener.hpp"

View file

@ -19,7 +19,12 @@
#include "network.hpp"
#include "server/input_stream.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <boost/scoped_ptr.hpp>
#include <boost/unordered_map.hpp>

View file

@ -58,7 +58,12 @@ namespace wb {
#include "overlay.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <boost/weak_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include <deque>

View file

@ -22,7 +22,12 @@
#include "SDL_events.h"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <boost/mpl/int.hpp>
#include <boost/utility/enable_if.hpp>

View file

@ -30,7 +30,12 @@
#ifndef GUI_WIDGETS_AUXILIARY_TIMER_HPP_INCLUDED
#define GUI_WIDGETS_AUXILIARY_TIMER_HPP_INCLUDED
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <SDL_types.h>

View file

@ -19,7 +19,12 @@
#include "gui/widgets/grid.hpp"
#include "reference_counted_object.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
class config;
class CVideo;

View file

@ -17,7 +17,12 @@
#include "gui/dialogs/field-fwd.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <string>
#include <vector>

View file

@ -19,7 +19,12 @@
#include "gui/auxiliary/window_builder.hpp"
#include "gui/auxiliary/placer.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <list>

View file

@ -18,7 +18,12 @@
#include "gui/auxiliary/notifier.hpp"
#include "gui/widgets/control.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
namespace gui2
{

View file

@ -15,7 +15,12 @@
#ifndef GUI_WIDGETS_SELECTABLE_HPP_INCLUDED
#define GUI_WIDGETS_SELECTABLE_HPP_INCLUDED
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
namespace gui2
{

View file

@ -24,7 +24,12 @@
#include "utils/foreach.tpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <string>
#include <vector>

View file

@ -21,7 +21,12 @@
#include <string>
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
namespace gui2
{

View file

@ -30,7 +30,12 @@
#include "SDL.h"
#include <string>
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
class CVideo;

View file

@ -5,7 +5,12 @@
#include "config.hpp"
#include <list>
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
/*
The purpose if this class is to preprocess incoming network data, and provide a steam that always returns just one command/action at a time.

View file

@ -19,7 +19,12 @@
#include "random_new.hpp"
#include "simple_rng.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
/*

View file

@ -20,7 +20,12 @@
#include "player.hpp"
#include "simple_wml.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
namespace wesnothd {

View file

@ -25,7 +25,12 @@
#include "room_manager.hpp"
#include "simple_wml.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <boost/scoped_ptr.hpp>
class server

View file

@ -17,7 +17,12 @@
#include <exception>
#include "config.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
class synced_command {
public:
/*

View file

@ -14,7 +14,12 @@
#ifndef SYNCED_CONTEXT_H_INCLUDED
#define SYNCED_CONTEXT_H_INCLUDED
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include "synced_commands.hpp"
#include "synced_checkup.hpp"
#include "replay.hpp"

View file

@ -17,7 +17,12 @@
#include "sdl/utils.hpp"
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
typedef boost::function<
void(const surface&, const double, const Uint32)>

View file

@ -19,7 +19,12 @@
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include <iostream>

View file

@ -22,7 +22,12 @@
#include <vector>
#include <deque>
#ifndef INCL_BOOST_FUNCTION_HPP_
#define INCL_BOOST_FUNCTION_HPP_
#include <boost/function.hpp>
#endif
#include "typedefs.hpp"