mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +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
@@ -34,7 +34,7 @@
|
||||
* the SOS flag explanation.
|
||||
*/
|
||||
unsigned int USBCamera::GetJpegSize(void* buffer, unsigned int buffSize) {
|
||||
uint8_t* data = (uint8_t*)buffer;
|
||||
uint8_t* data = static_cast<uint8_t*>(buffer);
|
||||
if (!wpi_assert(data[0] == 0xff && data[1] == 0xd8)) return 0;
|
||||
unsigned int pos = 2;
|
||||
while (pos < buffSize) {
|
||||
@@ -201,7 +201,8 @@ void USBCamera::UpdateSettings() {
|
||||
IMAQdxValueTypeF64, &minv);
|
||||
SAFE_IMAQ_CALL(IMAQdxGetAttributeMaximum, m_id, ATTR_EX_VALUE,
|
||||
IMAQdxValueTypeF64, &maxv);
|
||||
double val = minv + ((maxv - minv) * ((double)m_exposureValue / 100.0));
|
||||
double val =
|
||||
minv + (maxv - minv) * (static_cast<double>(m_exposureValue) / 100.0);
|
||||
SAFE_IMAQ_CALL(IMAQdxSetAttribute, m_id, ATTR_EX_VALUE,
|
||||
IMAQdxValueTypeF64, val);
|
||||
}
|
||||
@@ -215,7 +216,8 @@ void USBCamera::UpdateSettings() {
|
||||
IMAQdxValueTypeF64, &minv);
|
||||
SAFE_IMAQ_CALL(IMAQdxGetAttributeMaximum, m_id, ATTR_BR_VALUE,
|
||||
IMAQdxValueTypeF64, &maxv);
|
||||
double val = minv + ((maxv - minv) * ((double)m_brightness / 100.0));
|
||||
double val =
|
||||
minv + (maxv - minv) * (static_cast<double>(m_brightness) / 100.0);
|
||||
SAFE_IMAQ_CALL(IMAQdxSetAttribute, m_id, ATTR_BR_VALUE, IMAQdxValueTypeF64,
|
||||
val);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user