From 134c5e94e86167bb67564b4af8d5919640c8d680 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Wed, 22 Jun 2022 11:22:19 +0800 Subject: [PATCH] Issue #1769 - Part 2 Follow-up: Do not use namespace parent::child {} for defining nested namespaces. It doesn't build for MSVC on Windows. Also other decoders are using the old way for defining nested namespaces, so better be consistent here. --- image/DecoderFactory.h | 6 ++++-- image/decoders/nsJXLDecoder.cpp | 6 ++++-- image/decoders/nsJXLDecoder.h | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/image/DecoderFactory.h b/image/DecoderFactory.h index 05e720a347..4267b1f809 100644 --- a/image/DecoderFactory.h +++ b/image/DecoderFactory.h @@ -15,7 +15,8 @@ #include "nsCOMPtr.h" #include "SurfaceFlags.h" -namespace mozilla::image { +namespace mozilla { +namespace image { class Decoder; class IDecodingTask; @@ -200,6 +201,7 @@ private: bool aIsRedecode); }; -} // namespace mozilla::image +} // namespace image +} // namespace mozilla #endif // mozilla_image_DecoderFactory_h diff --git a/image/decoders/nsJXLDecoder.cpp b/image/decoders/nsJXLDecoder.cpp index e0e3407557..07a7849e28 100644 --- a/image/decoders/nsJXLDecoder.cpp +++ b/image/decoders/nsJXLDecoder.cpp @@ -17,7 +17,8 @@ using namespace mozilla::gfx; -namespace mozilla::image { +namespace mozilla { +namespace image { #define JXL_TRY(expr) \ do { \ @@ -162,4 +163,5 @@ nsJXLDecoder::FinishedJXLData() return Transition::TerminateFailure(); } -} // namespace mozilla::image +} // namespace image +} // namespace mozilla diff --git a/image/decoders/nsJXLDecoder.h b/image/decoders/nsJXLDecoder.h index d4a1abe7f8..f6eaf7e648 100644 --- a/image/decoders/nsJXLDecoder.h +++ b/image/decoders/nsJXLDecoder.h @@ -13,7 +13,8 @@ #include "jxl/decode_cxx.h" #include "jxl/thread_parallel_runner_cxx.h" -namespace mozilla::image { +namespace mozilla { +namespace image { class RasterImage; class nsJXLDecoder final : public Decoder { @@ -45,6 +46,7 @@ class nsJXLDecoder final : public Decoder { JxlBasicInfo mInfo{}; }; -} // namespace mozilla::image +} // namespace image +} // namespace mozilla #endif // mozilla_image_decoders_nsJXLDecoder_h