diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
commit | 14cd5182c5f64c43581c82db8c958369152226ac (patch) | |
tree | 57f150ba2707f29214eeb9b1eaad2373780d1b15 /canvas | |
parent | e4bb2b4f4875c15bd68297b5be716edd6859841e (diff) |
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough. (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)
Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.) C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.
Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper_text.cxx | 2 | ||||
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index c71d2f555091..6ab701b8012f 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -1215,7 +1215,7 @@ namespace cairocanvas { case rendering::PathJoinType::NONE: bNoLineJoin = true; - // cairo doesn't have join type NONE so we use MITER as it's pretty close + SAL_FALLTHROUGH; // cairo doesn't have join type NONE so we use MITER as it's pretty close case rendering::PathJoinType::MITER: cairo_set_line_join( mpCairo.get(), CAIRO_LINE_JOIN_MITER ); break; diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx index 03246f7b37a7..e7879c53a728 100644 --- a/canvas/source/cairo/cairo_canvashelper_text.cxx +++ b/canvas/source/cairo/cairo_canvashelper_text.cxx @@ -288,7 +288,7 @@ namespace cairocanvas case rendering::TextDirection::WEAK_RIGHT_TO_LEFT: nLayoutMode |= TEXT_LAYOUT_BIDI_RTL; - // FALLTHROUGH intended + SAL_FALLTHROUGH; case rendering::TextDirection::STRONG_RIGHT_TO_LEFT: nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG; nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_RIGHT; diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 79785aa15e2f..9596172fdf79 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -608,7 +608,7 @@ namespace vclcanvas case rendering::TextDirection::WEAK_RIGHT_TO_LEFT: nLayoutMode |= TEXT_LAYOUT_BIDI_RTL; - // FALLTHROUGH intended + SAL_FALLTHROUGH; case rendering::TextDirection::STRONG_RIGHT_TO_LEFT: nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG; nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_RIGHT; |