The default bug view has changed. See this FAQ.

Move Init() arguments into the constructor

RESOLVED FIXED in mozilla10

Status

()

Core
ImageLib
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Tracking

unspecified
mozilla10
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 561535 [details] [diff] [review]
Move Init() arguments into the constructor

This makes the lifetime of the arguments more clear. i.e. that they stay the same for the lifetime of the decoder.
Attachment #561535 - Flags: review?(joe)
Comment on attachment 561535 [details] [diff] [review]
Move Init() arguments into the constructor

Review of attachment 561535 [details] [diff] [review]:
-----------------------------------------------------------------

::: modules/libpr0n/decoders/nsBMPDecoder.cpp
@@ +63,5 @@
>  #define LINE(row) ((mBIH.height < 0) ? (-mBIH.height - (row)) : ((row) - 1))
>  #define PIXEL_OFFSET(row, col) (LINE(row) * mBIH.width + col)
>  
> +nsBMPDecoder::nsBMPDecoder(RasterImage *aImage, imgIDecoderObserver* aObserver) :
> +    Decoder(aImage, aObserver)

: on the same line as Decoder(. Do this throughout.

::: modules/libpr0n/src/Decoder.h
@@ +56,5 @@
>    /**
>     * Initialize an image decoder. Decoders may not be re-initialized.
>     *
>     * @param aContainer The image container to decode to.
>     * @param aObserver The observer for decode notification events.

This documentation needs to be moved to the constructor.

@@ +68,5 @@
>     * Initializes a decoder whose aImage and aObserver is already being used by a
>     * parent decoder. Decoders may not be re-initialized.
>     *
>     * @param aContainer The image container to decode to.
>     * @param aObserver The observer for decode notification events.

Ditto.
Attachment #561535 - Flags: review?(joe) → review+

Comment 2

6 years ago
https://hg.mozilla.org/mozilla-central/rev/cd9a14388367
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Assignee: nobody → jmuizelaar
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.