@@ -57,7 +57,7 @@ bool ArwDecoder::isAppropriateDecoder(const TiffRootIFD* rootIFD,
5757 return make == " SONY" ;
5858}
5959
60- RawImage ArwDecoder::decodeSRF (const TiffIFD* raw) {
60+ void ArwDecoder::decodeSRF (const TiffIFD* raw) {
6161 raw = mRootIFD ->getIFDWithTag (TiffTag::IMAGEWIDTH);
6262
6363 uint32_t width = raw->getEntry (TiffTag::IMAGEWIDTH)->getU32 ();
@@ -101,11 +101,9 @@ RawImage ArwDecoder::decodeSRF(const TiffIFD* raw) {
101101 UncompressedDecompressor u (
102102 ByteStream (DataBuffer (di.getSubView (0 , len), Endianness::little)), mRaw );
103103 u.decodeRawUnpacked <16 , Endianness::big>(width, height);
104-
105- return mRaw ;
106104}
107105
108- RawImage ArwDecoder::decodeRawInternal () {
106+ void ArwDecoder::decodeRawInternal () {
109107 const TiffIFD* raw = nullptr ;
110108 vector<const TiffIFD*> data = mRootIFD ->getIFDsWithTag (TiffTag::STRIPOFFSETS);
111109
@@ -127,11 +125,13 @@ RawImage ArwDecoder::decodeRawInternal() {
127125 mRaw ->createData ();
128126 a.decompress (input);
129127
130- return mRaw ;
128+ return ;
131129 }
132130
133- if (hints.has (" srf_format" ))
134- return decodeSRF (raw);
131+ if (hints.has (" srf_format" )) {
132+ decodeSRF (raw);
133+ return ;
134+ }
135135
136136 ThrowRDE (" No image data found" );
137137 }
@@ -140,7 +140,7 @@ RawImage ArwDecoder::decodeRawInternal() {
140140 int compression = raw->getEntry (TiffTag::COMPRESSION)->getU32 ();
141141 if (1 == compression) {
142142 DecodeUncompressed (raw);
143- return mRaw ;
143+ return ;
144144 }
145145
146146 if (32767 != compression)
@@ -176,7 +176,7 @@ RawImage ArwDecoder::decodeRawInternal() {
176176 // to detect it this way in the future.
177177 data = mRootIFD ->getIFDsWithTag (TiffTag::MAKE);
178178 if (data.size () > 1 ) {
179- for (auto & i : data) {
179+ for (auto & i : data) {
180180 std::string make = i->getEntry (TiffTag::MAKE)->getString ();
181181 /* Check for maker "SONY" without spaces */
182182 if (make == " SONY" )
@@ -199,14 +199,14 @@ RawImage ArwDecoder::decodeRawInternal() {
199199 std::array<uint32_t , 6 > sony_curve = {{0 , 0 , 0 , 0 , 0 , 4095 }};
200200
201201 for (uint32_t i = 0 ; i < 4 ; i++)
202- sony_curve[i+ 1 ] = (c->getU16 (i) >> 2 ) & 0xfff ;
202+ sony_curve[i + 1 ] = (c->getU16 (i) >> 2 ) & 0xfff ;
203203
204204 for (uint32_t i = 0 ; i < 0x4001 ; i++)
205205 curve[i] = i;
206206
207207 for (uint32_t i = 0 ; i < 5 ; i++)
208208 for (uint32_t j = sony_curve[i] + 1 ; j <= sony_curve[i + 1 ]; j++)
209- curve[j] = curve[j- 1 ] + (1 << i);
209+ curve[j] = curve[j - 1 ] + (1 << i);
210210
211211 RawImageCurveGuard curveHandler (&mRaw , curve, uncorrectedRawValues);
212212
@@ -227,8 +227,6 @@ RawImage ArwDecoder::decodeRawInternal() {
227227 a.decompress (input);
228228 } else
229229 DecodeARW2 (input, width, height, bitPerPixel);
230-
231- return mRaw ;
232230}
233231
234232void ArwDecoder::DecodeUncompressed (const TiffIFD* raw) const {
0 commit comments