Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Make mblg::Programs methods noexcept
Browse files Browse the repository at this point in the history
  • Loading branch information
pozdnyakov committed Dec 18, 2018
1 parent 025c24c commit 25ea831
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/mbgl/programs/programs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#include <mbgl/programs/symbol_program.hpp>

#define MBGL_DEFINE_GET_LAYER_PROGRAMS(ProgramsType, property) \
ProgramsType& Programs::get##ProgramsType() { \
ProgramsType& Programs::get##ProgramsType() noexcept { \
if (!property) { \
property = std::make_unique<ProgramsType>(context, programParameters); \
} \
return static_cast<ProgramsType&>(*property); \
return static_cast<ProgramsType&>(*property); \
}

namespace mbgl {
Expand Down
18 changes: 9 additions & 9 deletions src/mbgl/programs/programs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ class Programs {
Programs(gl::Context&, const ProgramParameters&);
~Programs();

BackgroundLayerPrograms& getBackgroundLayerPrograms();
RasterLayerPrograms& getRasterLayerPrograms();
HeatmapLayerPrograms& getHeatmapLayerPrograms();
CircleLayerPrograms& getCircleLayerPrograms();
HillshadeLayerPrograms& getHillshadeLayerPrograms();
FillLayerPrograms& getFillLayerPrograms();
FillExtrusionLayerPrograms& getFillExtrusionLayerPrograms();
LineLayerPrograms& getLineLayerPrograms();
SymbolLayerPrograms& getSymbolLayerPrograms();
BackgroundLayerPrograms& getBackgroundLayerPrograms() noexcept;
RasterLayerPrograms& getRasterLayerPrograms() noexcept;
HeatmapLayerPrograms& getHeatmapLayerPrograms() noexcept;
CircleLayerPrograms& getCircleLayerPrograms() noexcept;
HillshadeLayerPrograms& getHillshadeLayerPrograms() noexcept;
FillLayerPrograms& getFillLayerPrograms() noexcept;
FillExtrusionLayerPrograms& getFillExtrusionLayerPrograms() noexcept;
LineLayerPrograms& getLineLayerPrograms() noexcept;
SymbolLayerPrograms& getSymbolLayerPrograms() noexcept;

DebugProgram debug;
ClippingMaskProgram clippingMask;
Expand Down

0 comments on commit 25ea831

Please sign in to comment.