Skip to content

Commit 4eae7c8

Browse files
committed
Merge pull request #3266 from nglee:fix_return_by_const_value
2 parents 6fdb6e2 + 97a855f commit 4eae7c8

File tree

15 files changed

+32
-32
lines changed

15 files changed

+32
-32
lines changed

modules/bioinspired/include/opencv2/bioinspired/retina.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class CV_EXPORTS_W Retina : public Algorithm {
251251
/** @brief Outputs a string showing the used parameters setup
252252
@return a string which contains formated parameters information
253253
*/
254-
CV_WRAP virtual const String printSetup()=0;
254+
CV_WRAP virtual String printSetup()=0;
255255

256256
/** @brief Write xml/yml formated parameters information
257257
@param fs the filename of the xml file that will be open and writen with formatted parameters
@@ -389,9 +389,9 @@ class CV_EXPORTS_W Retina : public Algorithm {
389389
CV_WRAP virtual void getMagnoRAW(OutputArray retinaOutput_magno)=0;
390390

391391
/** @overload */
392-
CV_WRAP virtual const Mat getMagnoRAW() const=0;
392+
CV_WRAP virtual Mat getMagnoRAW() const=0;
393393
/** @overload */
394-
CV_WRAP virtual const Mat getParvoRAW() const=0;
394+
CV_WRAP virtual Mat getParvoRAW() const=0;
395395

396396
/** @brief Activate color saturation as the final step of the color demultiplexing process -\> this
397397
saturation is a sigmoide function applied to each channel of the demultiplexed image.

modules/bioinspired/include/opencv2/bioinspired/transientareassegmentationmodule.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class CV_EXPORTS_W TransientAreasSegmentationModule: public Algorithm
161161
/** @brief parameters setup display method
162162
@return a string which contains formatted parameters information
163163
*/
164-
CV_WRAP virtual const String printSetup()=0;
164+
CV_WRAP virtual String printSetup()=0;
165165

166166
/** @brief write xml/yml formated parameters information
167167
@param fs : the filename of the xml file that will be open and writen with formatted parameters information

modules/bioinspired/src/retina.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class RetinaImpl CV_FINAL : public Retina
148148
* parameters setup display method
149149
* @return a string which contains formatted parameters information
150150
*/
151-
const String printSetup() CV_OVERRIDE;
151+
String printSetup() CV_OVERRIDE;
152152

153153
/**
154154
* write xml/yml formated parameters information
@@ -233,8 +233,8 @@ class RetinaImpl CV_FINAL : public Retina
233233
void getMagnoRAW(OutputArray retinaOutput_magno) CV_OVERRIDE;
234234

235235
// original API level data accessors : get buffers addresses from a Mat header, similar to getParvoRAW and getMagnoRAW...
236-
const Mat getMagnoRAW() const CV_OVERRIDE;
237-
const Mat getParvoRAW() const CV_OVERRIDE;
236+
Mat getMagnoRAW() const CV_OVERRIDE;
237+
Mat getParvoRAW() const CV_OVERRIDE;
238238

239239
/**
240240
* activate color saturation as the final step of the color demultiplexing process
@@ -445,7 +445,7 @@ void RetinaImpl::setup(RetinaParameters newConfiguration)
445445

446446
}
447447

448-
const String RetinaImpl::printSetup()
448+
String RetinaImpl::printSetup()
449449
{
450450
std::stringstream outmessage;
451451

@@ -692,14 +692,14 @@ void RetinaImpl::getParvoRAW(OutputArray parvoOutputBufferCopy)
692692
}
693693

694694
// original API level data accessors : get buffers addresses...
695-
const Mat RetinaImpl::getMagnoRAW() const {
695+
Mat RetinaImpl::getMagnoRAW() const {
696696
CV_Assert(!_wasOCLRunCalled);
697697
// create a cv::Mat header for the valarray
698698
return Mat((int)_retinaFilter->getMovingContours().size(),1, CV_32F, (void*)get_data(_retinaFilter->getMovingContours()));
699699

700700
}
701701

702-
const Mat RetinaImpl::getParvoRAW() const {
702+
Mat RetinaImpl::getParvoRAW() const {
703703
CV_Assert(!_wasOCLRunCalled);
704704
if (_retinaFilter->getColorMode()) // check if color mode is enabled
705705
{

modules/bioinspired/src/retina_ocl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void RetinaOCLImpl::setup(cv::bioinspired::RetinaParameters newConfiguration)
203203
setupIPLMagnoChannel(_retinaParameters.IplMagno.normaliseOutput, _retinaParameters.IplMagno.parasolCells_beta, _retinaParameters.IplMagno.parasolCells_tau, _retinaParameters.IplMagno.parasolCells_k, _retinaParameters.IplMagno.amacrinCellsTemporalCutFrequency, _retinaParameters.IplMagno.V0CompressionParameter, _retinaParameters.IplMagno.localAdaptintegration_tau, _retinaParameters.IplMagno.localAdaptintegration_k);
204204
}
205205

206-
const String RetinaOCLImpl::printSetup()
206+
String RetinaOCLImpl::printSetup()
207207
{
208208
std::stringstream outmessage;
209209

@@ -448,8 +448,8 @@ void RetinaOCLImpl::getMagnoRAW(OutputArray retinaOutput_magno)
448448

449449
// unimplemented interfaces:
450450
void RetinaOCLImpl::applyFastToneMapping(InputArray /*inputImage*/, OutputArray /*outputToneMappedImage*/) { NOT_IMPLEMENTED; }
451-
const Mat RetinaOCLImpl::getMagnoRAW() const { NOT_IMPLEMENTED; }
452-
const Mat RetinaOCLImpl::getParvoRAW() const { NOT_IMPLEMENTED; }
451+
Mat RetinaOCLImpl::getMagnoRAW() const { NOT_IMPLEMENTED; }
452+
Mat RetinaOCLImpl::getParvoRAW() const { NOT_IMPLEMENTED; }
453453

454454
///////////////////////////////////////
455455
///////// BasicRetinaFilter ///////////

modules/bioinspired/src/retina_ocl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ class RetinaOCLImpl CV_FINAL : public Retina
643643

644644
RetinaParameters getParameters() CV_OVERRIDE;
645645

646-
const String printSetup() CV_OVERRIDE;
646+
String printSetup() CV_OVERRIDE;
647647
virtual void write(String fs) const CV_OVERRIDE;
648648
virtual void write(FileStorage& fs) const CV_OVERRIDE;
649649

@@ -663,8 +663,8 @@ class RetinaOCLImpl CV_FINAL : public Retina
663663
void applyFastToneMapping(InputArray /*inputImage*/, OutputArray /*outputToneMappedImage*/) CV_OVERRIDE;
664664
void getParvoRAW(OutputArray /*retinaOutput_parvo*/) CV_OVERRIDE;
665665
void getMagnoRAW(OutputArray /*retinaOutput_magno*/) CV_OVERRIDE;
666-
const Mat getMagnoRAW() const CV_OVERRIDE;
667-
const Mat getParvoRAW() const CV_OVERRIDE;
666+
Mat getMagnoRAW() const CV_OVERRIDE;
667+
Mat getParvoRAW() const CV_OVERRIDE;
668668

669669
protected:
670670
RetinaParameters _retinaParameters;

modules/bioinspired/src/transientareassegmentationmodule.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class TransientAreasSegmentationModuleImpl : protected BasicRetinaFilter
142142
* parameters setup display method
143143
* @return a string which contains formatted parameters information
144144
*/
145-
const String printSetup();
145+
String printSetup();
146146

147147
/**
148148
* write xml/yml formated parameters information
@@ -232,7 +232,7 @@ class TransientAreasSegmentationModuleImpl_: public TransientAreasSegmentationM
232232
inline virtual void setup(String segmentationParameterFile, const bool applyDefaultSetupOnFailure) CV_OVERRIDE { _segmTool.setup(segmentationParameterFile, applyDefaultSetupOnFailure); }
233233
inline virtual void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure) CV_OVERRIDE { _segmTool.setup(fs, applyDefaultSetupOnFailure); }
234234
inline virtual void setup(SegmentationParameters newParameters) CV_OVERRIDE { _segmTool.setup(newParameters); }
235-
inline virtual const String printSetup() CV_OVERRIDE { return _segmTool.printSetup(); }
235+
inline virtual String printSetup() CV_OVERRIDE { return _segmTool.printSetup(); }
236236
inline virtual struct SegmentationParameters getParameters() CV_OVERRIDE { return _segmTool.getParameters(); }
237237
inline virtual void write( String fs ) const CV_OVERRIDE { _segmTool.write(fs); }
238238
inline virtual void run(InputArray inputToSegment, const int channelIndex) CV_OVERRIDE { _segmTool.run(inputToSegment, channelIndex); }
@@ -368,7 +368,7 @@ void TransientAreasSegmentationModuleImpl::setup(cv::bioinspired::SegmentationPa
368368

369369
}
370370

371-
const String TransientAreasSegmentationModuleImpl::printSetup()
371+
String TransientAreasSegmentationModuleImpl::printSetup()
372372
{
373373
std::stringstream outmessage;
374374

modules/rgbd/include/opencv2/rgbd/colored_kinfu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class CV_EXPORTS_W ColoredKinFu
255255
CV_WRAP virtual void reset() = 0;
256256

257257
/** @brief Get current pose in voxel space */
258-
virtual const Affine3f getPose() const = 0;
258+
virtual Affine3f getPose() const = 0;
259259

260260
/** @brief Process next depth frame
261261
@param depth input Mat of depth frame

modules/rgbd/include/opencv2/rgbd/dynafu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class CV_EXPORTS_W DynaFu
9595
CV_WRAP virtual void reset() = 0;
9696

9797
/** @brief Get current pose in voxel space */
98-
virtual const Affine3f getPose() const = 0;
98+
virtual Affine3f getPose() const = 0;
9999

100100
/** @brief Process next depth frame
101101

modules/rgbd/include/opencv2/rgbd/kinfu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class CV_EXPORTS_W KinFu
251251
CV_WRAP virtual void reset() = 0;
252252

253253
/** @brief Get current pose in voxel space */
254-
virtual const Affine3f getPose() const = 0;
254+
virtual Affine3f getPose() const = 0;
255255

256256
/** @brief Process next depth frame
257257

modules/rgbd/include/opencv2/rgbd/large_kinfu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class CV_EXPORTS_W LargeKinfu
136136

137137
CV_WRAP virtual void reset() = 0;
138138

139-
virtual const Affine3f getPose() const = 0;
139+
virtual Affine3f getPose() const = 0;
140140

141141
CV_WRAP virtual bool update(InputArray depth) = 0;
142142
};

0 commit comments

Comments
 (0)