Skip to content

Commit

Permalink
chore: nested namespace declarations are part of C++17 (CasparCG#1570)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitry-ishenko authored Sep 20, 2024
1 parent 804b8de commit a026fbd
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 54 deletions.
1 change: 0 additions & 1 deletion src/accelerator/StdAfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <common/assert.h>
#include <common/env.h>
#include <common/except.h>
#include <common/forward.h>
#include <common/future.h>
#include <common/gl/gl_check.h>
#include <common/memory.h>
Expand Down
1 change: 0 additions & 1 deletion src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ set(HEADERS
executor.h
except.h
filesystem.h
forward.h
future.h
log.h
memory.h
Expand Down
15 changes: 0 additions & 15 deletions src/common/forward.h

This file was deleted.

1 change: 0 additions & 1 deletion src/core/StdAfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <common/env.h>
#include <common/except.h>
#include <common/executor.h>
#include <common/forward.h>
#include <common/future.h>
#include <common/log.h>
#include <common/memory.h>
Expand Down
4 changes: 1 addition & 3 deletions src/core/consumer/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@
#include "../fwd.h"
#include "../monitor/monitor.h"

#include <common/forward.h>
#include <common/memory.h>

#include <core/video_format.h>

#include <memory>

FORWARD2(caspar, diagnostics, class graph);
namespace caspar::diagnostics { class graph; }

namespace caspar { namespace core {

Expand Down
46 changes: 22 additions & 24 deletions src/core/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,26 @@
*/
#pragma once

#include <common/forward.h>
namespace caspar::accelerator { class accelerator; }
namespace caspar::accelerator::ogl { class device; }

FORWARD2(caspar, accelerator, class accelerator);
FORWARD3(caspar, accelerator, ogl, class device);

FORWARD2(caspar, core, class stage);
FORWARD2(caspar, core, class mixer);
FORWARD2(caspar, core, class output);
FORWARD2(caspar, core, class image_mixer);
FORWARD2(caspar, core, struct video_format_desc);
FORWARD2(caspar, core, class frame_factory);
FORWARD2(caspar, core, class frame_producer);
FORWARD2(caspar, core, class frame_consumer);
FORWARD2(caspar, core, class draw_frame);
FORWARD2(caspar, core, class mutable_frame);
FORWARD2(caspar, core, class const_frame);
FORWARD2(caspar, core, class video_channel);
FORWARD2(caspar, core, struct pixel_format_desc);
FORWARD2(caspar, core, class cg_producer_registry);
FORWARD2(caspar, core, struct frame_transform);
FORWARD2(caspar, core, struct write_frame_consumer);
FORWARD2(caspar, core, struct frame_producer_dependencies);
FORWARD2(caspar, core, struct module_dependencies);
FORWARD2(caspar, core, class frame_producer_registry);
FORWARD2(caspar, core, class video_format_repository);
namespace caspar::core { class stage; }
namespace caspar::core { class mixer; }
namespace caspar::core { class output; }
namespace caspar::core { class image_mixer; }
namespace caspar::core { struct video_format_desc; }
namespace caspar::core { class frame_factory; }
namespace caspar::core { class frame_producer; }
namespace caspar::core { class frame_consumer; }
namespace caspar::core { class draw_frame; }
namespace caspar::core { class mutable_frame; }
namespace caspar::core { class const_frame; }
namespace caspar::core { class video_channel; }
namespace caspar::core { struct pixel_format_desc; }
namespace caspar::core { class cg_producer_registry; }
namespace caspar::core { struct frame_transform; }
namespace caspar::core { struct write_frame_consumer; }
namespace caspar::core { struct frame_producer_dependencies; }
namespace caspar::core { struct module_dependencies; }
namespace caspar::core { class frame_producer_registry; }
namespace caspar::core { class video_format_repository; }
3 changes: 1 addition & 2 deletions src/core/mixer/audio/audio_mixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#pragma once

#include <common/array.h>
#include <common/forward.h>
#include <common/memory.h>

#include <core/frame/frame_visitor.h>
Expand All @@ -31,7 +30,7 @@

#include <cstdint>

FORWARD2(caspar, diagnostics, class graph);
namespace caspar::diagnostics { class graph; }

namespace caspar { namespace core {

Expand Down
5 changes: 2 additions & 3 deletions src/core/mixer/mixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
#pragma once

#include <common/bit_depth.h>
#include <common/forward.h>
#include <common/memory.h>

#include <core/fwd.h>
#include <core/monitor/monitor.h>

FORWARD2(caspar, diagnostics, class graph);
namespace caspar::diagnostics { class graph; }

namespace caspar { namespace core {

Expand Down Expand Up @@ -58,4 +57,4 @@ class mixer final
spl::shared_ptr<impl> impl_;
};

}} // namespace caspar::core
}} // namespace caspar::core
3 changes: 1 addition & 2 deletions src/core/producer/stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "../monitor/monitor.h"

#include <common/executor.h>
#include <common/forward.h>
#include <common/memory.h>
#include <common/tweener.h>

Expand All @@ -39,7 +38,7 @@
#include <tuple>
#include <vector>

FORWARD2(caspar, diagnostics, class graph);
namespace caspar::diagnostics { class graph; }

namespace caspar { namespace core {

Expand Down
3 changes: 1 addition & 2 deletions src/protocol/amcp/amcp_command_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
#include "amcp_command_repository.h"
#include "amcp_shared.h"
#include <accelerator/accelerator.h>
#include <common/forward.h>
#include <core/consumer/frame_consumer.h>
#include <future>
#include <utility>

FORWARD3(caspar, protocol, osc, class client);
namespace caspar::protocol::osc { class client; }

namespace caspar { namespace protocol { namespace amcp {

Expand Down

0 comments on commit a026fbd

Please sign in to comment.