From 3874bc6a9bf980db4aed640433eeac9d533b1f36 Mon Sep 17 00:00:00 2001 From: St??phane Gimenez Date: Fri, 23 Jan 2009 21:55:34 +0000 Subject: small cleanup in src/trace (warnings and trailing spaces) (bzr r7162) --- src/trace/siox.cpp | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'src/trace/siox.cpp') diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp index adddd5f44..b3404fc00 100644 --- a/src/trace/siox.cpp +++ b/src/trace/siox.cpp @@ -119,7 +119,7 @@ void CieLab::init() _clab_inited_ = true; } } - + /** @@ -380,7 +380,7 @@ SioxImage::~SioxImage() /** * Error logging */ -void SioxImage::error(char *fmt, ...) +void SioxImage::error(const char *fmt, ...) { char msgbuf[256]; va_list args; @@ -430,7 +430,7 @@ void SioxImage::setPixel(unsigned int x, return; } unsigned long offset = width * y + x; - pixdata[offset] = pixval; + pixdata[offset] = pixval; } /** @@ -438,8 +438,8 @@ void SioxImage::setPixel(unsigned int x, * If the coordinates are out of range, do nothing. */ void SioxImage::setPixel(unsigned int x, unsigned int y, - unsigned int a, - unsigned int r, + unsigned int a, + unsigned int r, unsigned int g, unsigned int b) { @@ -472,7 +472,7 @@ unsigned int SioxImage::getPixel(unsigned int x, unsigned int y) return 0L; } unsigned long offset = width * y + x; - return pixdata[offset]; + return pixdata[offset]; } /** @@ -498,7 +498,7 @@ void SioxImage::setConfidence(unsigned int x, return; } unsigned long offset = width * y + x; - cmdata[offset] = confval; + cmdata[offset] = confval; } /** @@ -514,7 +514,7 @@ float SioxImage::getConfidence(unsigned int x, unsigned int y) return 0.0; } unsigned long offset = width * y + x; - return cmdata[offset]; + return cmdata[offset]; } /** @@ -718,7 +718,7 @@ const float Siox::CERTAIN_FOREGROUND_CONFIDENCE=1.0f; */ const float Siox::FOREGROUND_CONFIDENCE=0.8f; -/** +/** * Confidence for foreground or background type being equally likely. */ const float Siox::UNKNOWN_REGION_CONFIDENCE=0.5f; @@ -764,7 +764,7 @@ Siox::~Siox() /** * Error logging */ -void Siox::error(char *fmt, ...) +void Siox::error(const char *fmt, ...) { char msgbuf[256]; va_list args; @@ -781,7 +781,7 @@ void Siox::error(char *fmt, ...) /** * Trace logging */ -void Siox::trace(char *fmt, ...) +void Siox::trace(const char *fmt, ...) { char msgbuf[256]; va_list args; @@ -944,14 +944,14 @@ SioxImage Siox::extractForeground(const SioxImage &originalImage, trace("### Analyzing image"); std::map hs; - + unsigned int progressResolution = pixelCount / 10; for (unsigned int i=0; i &inputVec, { error("Could not allocate buffer for signature"); return false; - } + } for (unsigned int i=0 ; i < length ; i++) input[i] = inputVec[i]; @@ -1643,7 +1641,7 @@ void Siox::normalizeMatrix(float *cm, int cmSize) float max= -1000000.0f; for (int i=0; i max) max=cm[i]; - + //good to use STL, but max() is not iterative //float max = *std::max(cm, cm + cmSize); -- cgit v1.2.3