mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Fixes warnings thrown by cpplint.py (#154)
* Fixed cpplint.py [runtime/int] warnings * Fixed cpplint.py [readability/casting] warnings * Fixed cpplint.py [readability/namespace] warnings * Fixed cpplint.py [readability/braces] warnings * Fixed cpplint.py [whitespace/braces] warnings * Fixed cpplint.py [runtime/explicit] warnings * Fixed cpplint.py [runtime/printf] warnings * Fixed cpplint.py [readability/inheritance] warnings * Fixed cpplint.py [whitespace/tab] warnings * Fixed cpplint.py [build/storage_class] warnings * Fixed cpplint.py [readability/multiline_comment] warnings * Fixed cpplint.py [whitespace/semicolon] warnings * Fixed cpplint.py [readability/check] warnings * Fixed cpplint.py [runtime/arrays] warnings * Ran format.py
This commit is contained in:
committed by
Peter Johnson
parent
e44a6e227a
commit
0cb288ffba
@@ -57,8 +57,7 @@ int frcDispose(void* object) { return imaqDispose(object); }
|
||||
* @return On success: 1. On failure: 0. To get extended error information, call
|
||||
* GetLastError().
|
||||
*/
|
||||
int frcDispose(const char* functionName, ...) /* Variable argument list */
|
||||
{
|
||||
int frcDispose(const char* functionName, ...) {
|
||||
va_list disposalPtrList; /* Input argument list */
|
||||
void* disposalPtr; /* For iteration */
|
||||
int success, returnValue = 1;
|
||||
@@ -281,7 +280,9 @@ ColorHistogramReport* frcColorHistogram(const Image* image, int numClasses,
|
||||
|
||||
ColorHistogramReport* frcColorHistogram(const Image* image, int numClasses,
|
||||
ColorMode mode, Image* mask) {
|
||||
return imaqColorHistogram2((Image*)image, numClasses, mode, nullptr, mask);
|
||||
return imaqColorHistogram2(
|
||||
const_cast<Image*>(reinterpret_cast<const Image*>(image)), numClasses,
|
||||
mode, nullptr, mask);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -451,14 +452,14 @@ int frcParticleAnalysis(Image* image, int particleNumber,
|
||||
if (!success) {
|
||||
return success;
|
||||
}
|
||||
par->center_mass_x = (int)returnDouble; // pixel
|
||||
par->center_mass_x = static_cast<int>(returnDouble); // pixel
|
||||
|
||||
success = imaqMeasureParticle(image, particleNumber, 0,
|
||||
IMAQ_MT_CENTER_OF_MASS_Y, &returnDouble);
|
||||
if (!success) {
|
||||
return success;
|
||||
}
|
||||
par->center_mass_y = (int)returnDouble; // pixel
|
||||
par->center_mass_y = static_cast<int>(returnDouble); // pixel
|
||||
|
||||
/* particle size statistics */
|
||||
success = imaqMeasureParticle(image, particleNumber, 0, IMAQ_MT_AREA,
|
||||
@@ -473,28 +474,28 @@ int frcParticleAnalysis(Image* image, int particleNumber,
|
||||
if (!success) {
|
||||
return success;
|
||||
}
|
||||
par->boundingRect.top = (int)returnDouble;
|
||||
par->boundingRect.top = static_cast<int>(returnDouble);
|
||||
|
||||
success = imaqMeasureParticle(image, particleNumber, 0,
|
||||
IMAQ_MT_BOUNDING_RECT_LEFT, &returnDouble);
|
||||
if (!success) {
|
||||
return success;
|
||||
}
|
||||
par->boundingRect.left = (int)returnDouble;
|
||||
par->boundingRect.left = static_cast<int>(returnDouble);
|
||||
|
||||
success = imaqMeasureParticle(image, particleNumber, 0,
|
||||
IMAQ_MT_BOUNDING_RECT_HEIGHT, &returnDouble);
|
||||
if (!success) {
|
||||
return success;
|
||||
}
|
||||
par->boundingRect.height = (int)returnDouble;
|
||||
par->boundingRect.height = static_cast<int>(returnDouble);
|
||||
|
||||
success = imaqMeasureParticle(image, particleNumber, 0,
|
||||
IMAQ_MT_BOUNDING_RECT_WIDTH, &returnDouble);
|
||||
if (!success) {
|
||||
return success;
|
||||
}
|
||||
par->boundingRect.width = (int)returnDouble;
|
||||
par->boundingRect.width = static_cast<int>(returnDouble);
|
||||
|
||||
/* particle quality statistics */
|
||||
success = imaqMeasureParticle(image, particleNumber, 0,
|
||||
|
||||
Reference in New Issue
Block a user