Skip to content

Commit

Permalink
tidy: Use uppercase for literal suffixes (e.g. 'U', 'ULL', 'F'). (2/2)
Browse files Browse the repository at this point in the history
Clang-tidy pointed out various places where a lowercase literal suffix
was used on a number.  Changes made by hand.

This code was pointed out by clang-tidy's "uppercase literal suffix"
check.

https://clang.llvm.org/extra/clang-tidy/checks/readability-uppercase-literal-suffix.html
  • Loading branch information
linuxdude42 committed Mar 26, 2019
1 parent bba55f4 commit 021489b
Show file tree
Hide file tree
Showing 54 changed files with 225 additions and 225 deletions.
2 changes: 1 addition & 1 deletion mythplugins/mytharchive/mytharchive/thumbfinder.h
Expand Up @@ -85,7 +85,7 @@ class ThumbFinder : public MythScreenType
MythAVCopy m_copy;
QScopedPointer<MythPictureDeinterlacer> m_deinterlacer;

float m_fps {0.0f};
float m_fps {0.0F};
unsigned char *m_outputbuf {nullptr};
QString m_frameFile;
int m_frameWidth { 0};
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythgallery/mythgallery/glsingleview.cpp
Expand Up @@ -1043,7 +1043,7 @@ void GLSingleView::EffectCube(void)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();

// float PI = 4.0f * atan(1.0F);
// float PI = 4.0F * atan(1.0F);
float const znear = 3.0F;
// float theta = 2.0F * atan2(2.0F / 2.0F, znear);
// theta = theta * 180.0F/PI;
Expand Down
14 changes: 7 additions & 7 deletions mythplugins/mythgallery/mythgallery/glsingleview.h
Expand Up @@ -118,8 +118,8 @@ class GLSingleView : public QGLWidget, public ImageView

private:
// General
float m_source_x {0.0f};
float m_source_y {0.0f};
float m_source_x {0.0F};
float m_source_y {0.0F};
ScaleMax m_scaleMax {kScaleToFit};

// Texture variables (for display and effects)
Expand All @@ -136,18 +136,18 @@ class GLSingleView : public QGLWidget, public ImageView
int m_effect_rotate_direction {0};
MythTimer m_effect_frame_time;
int m_effect_transition_timeout {2000};
float m_effect_transition_timeout_inv {1.0f / 2000};
float m_effect_transition_timeout_inv {1.0F / 2000};

// Unshared effect state variables
float m_effect_flutter_points[40][40][3];
float m_effect_cube_xrot {0.0f};
float m_effect_cube_yrot {0.0f};
float m_effect_cube_zrot {0.0f};
float m_effect_cube_xrot {0.0F};
float m_effect_cube_yrot {0.0F};
float m_effect_cube_zrot {0.0F};
float m_effect_kenBurns_location_x[2];
float m_effect_kenBurns_location_y[2];
int m_effect_kenBurns_projection[2];
MythTimer m_effect_kenBurns_image_time[2];
float m_effect_kenBurns_image_timeout {0.0f};
float m_effect_kenBurns_image_timeout {0.0F};
KenBurnsImageLoader *m_effect_kenBurns_imageLoadThread {nullptr};
bool m_effect_kenBurns_image_ready {true};
QImage m_effect_kenBurns_image;
Expand Down
6 changes: 3 additions & 3 deletions mythplugins/mythgallery/mythgallery/gltexture.h
Expand Up @@ -42,7 +42,7 @@ class GLTexture
void Deinit(void);

void Bind(void);
void MakeQuad(float alpha = 1.0f, float scale = 1.0f);
void MakeQuad(float alpha = 1.0F, float scale = 1.0F);
void SwapWidthHeight(void)
{ int tmp = width; width = height; height = tmp; }

Expand All @@ -69,8 +69,8 @@ class GLTexture
ThumbItem *item {nullptr};
int width {512};
int height {512};
float cx {1.0f};
float cy {1.0f};
float cx {1.0F};
float cy {1.0F};
};

#endif // USING_OPENGL
Expand Down
6 changes: 3 additions & 3 deletions mythplugins/mythgallery/mythgallery/imageview.h
Expand Up @@ -91,12 +91,12 @@ class ImageView

protected:
QSize m_screenSize {640,480};
float m_wmult {1.0f};
float m_hmult {1.0f};
float m_wmult {1.0F};
float m_hmult {1.0F};
int m_pos;
int *m_savedPos {nullptr};
int m_movieState {0};
float m_zoom {1.0f};
float m_zoom {1.0F};

bool m_info_show {false};
bool m_info_show_short {false};
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythgallery/mythgallery/mythdialogs.h
Expand Up @@ -87,8 +87,8 @@ class MPUBLIC MythDialog : public QFrame

void keyPressEvent(QKeyEvent *e) override; // QWidget

float m_dlgwmult {0.0f};
float m_dlghmult {0.0f};
float m_dlgwmult {0.0F};
float m_dlghmult {0.0F};
int m_screenwidth {0};
int m_screenheight {0};
int m_xbase {0};
Expand Down
8 changes: 4 additions & 4 deletions mythplugins/mythgallery/mythgallery/singleview.h
Expand Up @@ -130,15 +130,15 @@ class SingleView : public MythDialog, public ImageView
int m_effect_i {0}; ///< misc effects iterator
int m_effect_j {0}; ///< misc effects iterator
int m_effect_framerate {0}; ///< timeout between effects
float m_effect_delta2_x {0.0f};
float m_effect_delta2_y {0.0f};
float m_effect_alpha {0.0f};
float m_effect_delta2_x {0.0F};
float m_effect_delta2_y {0.0F};
float m_effect_alpha {0.0F};

// Unshared effect state variables
QPoint m_effect_spiral_tmp0 {0,0};
QPoint m_effect_spiral_tmp1 {0,0};
vector<int> m_effect_meltdown_y_disp;
float m_effect_multi_circle_out_delta_alpha {0.0f};
float m_effect_multi_circle_out_delta_alpha {0.0F};
QPolygon m_effect_milti_circle_out_points {4};
QPolygon m_effect_circle_out_points {4};
};
Expand Down
76 changes: 38 additions & 38 deletions mythplugins/mythmusic/mythmusic/inlines.h
Expand Up @@ -16,7 +16,7 @@ static inline void stereo16_from_stereopcm8(short *l,
uchar *c,
long cnt)
{
while (cnt >= 4l) {
while (cnt >= 4L) {
l[0] = c[0];
r[0] = c[1];
l[1] = c[2];
Expand All @@ -28,16 +28,16 @@ static inline void stereo16_from_stereopcm8(short *l,
l += 4;
r += 4;
c += 8;
cnt -= 4l;
cnt -= 4L;
}

if (cnt > 0l) {
if (cnt > 0L) {
l[0] = c[0];
r[0] = c[1];
if (cnt > 1l) {
if (cnt > 1L) {
l[1] = c[2];
r[1] = c[3];
if (cnt > 2l) {
if (cnt > 2L) {
l[2] = c[4];
r[2] = c[5];
}
Expand All @@ -51,7 +51,7 @@ static inline void stereo16_from_stereopcm16(short *l,
short *s,
long cnt)
{
while (cnt >= 4l) {
while (cnt >= 4L) {
l[0] = s[0];
r[0] = s[1];
l[1] = s[2];
Expand All @@ -63,16 +63,16 @@ static inline void stereo16_from_stereopcm16(short *l,
l += 4;
r += 4;
s += 8;
cnt -= 4l;
cnt -= 4L;
}

if (cnt > 0l) {
if (cnt > 0L) {
l[0] = s[0];
r[0] = s[1];
if (cnt > 1l) {
if (cnt > 1L) {
l[1] = s[2];
r[1] = s[3];
if (cnt > 2l) {
if (cnt > 2L) {
l[2] = s[4];
r[2] = s[5];
}
Expand All @@ -99,8 +99,8 @@ static inline void stereo16_from_stereopcmfloat(short *l,
long cnt)
{
while (cnt--) {
*l++ = (short)(*s++ * 32767.0f);
*r++ = (short)(*s++ * 32767.0f);
*l++ = (short)(*s++ * 32767.0F);
*r++ = (short)(*s++ * 32767.0F);
}
}

Expand All @@ -109,21 +109,21 @@ static inline void mono16_from_monopcm8(short *l,
uchar *c,
long cnt)
{
while (cnt >= 4l) {
while (cnt >= 4L) {
l[0] = c[0];
l[1] = c[1];
l[2] = c[2];
l[3] = c[3];
l += 4;
c += 4;
cnt -= 4l;
cnt -= 4L;
}

if (cnt > 0l) {
if (cnt > 0L) {
l[0] = c[0];
if (cnt > 1l) {
if (cnt > 1L) {
l[1] = c[1];
if (cnt > 2l) {
if (cnt > 2L) {
l[2] = c[2];
}
}
Expand All @@ -135,21 +135,21 @@ static inline void mono16_from_monopcm16(short *l,
short *s,
long cnt)
{
while (cnt >= 4l) {
while (cnt >= 4L) {
l[0] = s[0];
l[1] = s[1];
l[2] = s[2];
l[3] = s[3];
l += 4;
s += 4;
cnt -= 4l;
cnt -= 4L;
}

if (cnt > 0l) {
if (cnt > 0L) {
l[0] = s[0];
if (cnt > 1l) {
if (cnt > 1L) {
l[1] = s[1];
if (cnt > 2l) {
if (cnt > 2L) {
l[2] = s[2];
}
}
Expand All @@ -171,7 +171,7 @@ static inline void mono16_from_monopcmfloat(short *l,
long cnt)
{
while (cnt--)
*l++ = (short)(*s++ * 32767.0f);
*l++ = (short)(*s++ * 32767.0F);
}


Expand All @@ -180,20 +180,20 @@ static inline void fast_short_set(short *p,
short v,
long c)
{
while (c >= 4l) {
while (c >= 4L) {
p[0] = v;
p[1] = v;
p[2] = v;
p[3] = v;
p += 4;
c -= 4l;
c -= 4L;
}

if (c > 0l) {
if (c > 0L) {
p[0] = v;
if (c > 1l) {
if (c > 1L) {
p[1] = v;
if (c > 2l) {
if (c > 2L) {
p[2] = v;
}
}
Expand All @@ -205,21 +205,21 @@ static inline void fast_real_set_from_short(fftw_real *d,
short *s,
long c)
{
while (c >= 4l) {
while (c >= 4L) {
d[0] = fftw_real(s[0]);
d[1] = fftw_real(s[1]);
d[2] = fftw_real(s[2]);
d[3] = fftw_real(s[3]);
d += 4;
s += 4;
c -= 4l;
c -= 4L;
}

if (c > 0l) {
if (c > 0L) {
d[0] = fftw_real(s[0]);
if (c > 1l) {
if (c > 1L) {
d[1] = fftw_real(s[1]);
if (c > 2l) {
if (c > 2L) {
d[2] = fftw_real(s[2]);
}
}
Expand All @@ -231,7 +231,7 @@ static inline void fast_reals_set(fftw_real *p1,
fftw_real v,
long c)
{
while (c >= 4l) {
while (c >= 4L) {
p1[0] = v;
p1[1] = v;
p1[2] = v;
Expand All @@ -242,16 +242,16 @@ static inline void fast_reals_set(fftw_real *p1,
p2[3] = v;
p1 += 4;
p2 += 4;
c -= 4l;
c -= 4L;
}

if (c > 0l) {
if (c > 0L) {
p1[0] = v;
p2[0] = v;
if (c > 1l) {
if (c > 1L) {
p1[1] = v;
p2[1] = v;
if (c > 2l) {
if (c > 2L) {
p1[2] = v;
p2[2] = v;
}
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythmusic/mythmusic/musicplayer.h
Expand Up @@ -236,7 +236,7 @@ class MusicPlayer : public QObject, public MythObservable
ResumeMode m_resumeModeEditor {RESUME_OFF};
ResumeMode m_resumeModeRadio {RESUME_TRACK};

float m_playSpeed {1.0f};
float m_playSpeed {1.0F};

// notification
bool m_showScannerNotifications {true};
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythmusic/mythmusic/visualize.cpp
Expand Up @@ -1139,7 +1139,7 @@ bool Piano::process_all_types(VisualNode *node, bool /*this_will_be_displayed*/)

#if 0
// Take logs everywhere, and shift up to [0, ??]
if(magnitude_av > 0.0f)
if(magnitude_av > 0.0F)
{
magnitude_av = log(magnitude_av);
}
Expand All @@ -1149,7 +1149,7 @@ bool Piano::process_all_types(VisualNode *node, bool /*this_will_be_displayed*/)
}
magnitude_av -= PIANO_MIN_VOL;

if (magnitude_av < 0.0f)
if (magnitude_av < 0.0F)
{
magnitude_av = 0.0;
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmyth/audio/audiooutputca.cpp
Expand Up @@ -440,7 +440,7 @@ int AudioOutputCA::GetVolumeChannel(int channel) const
if (!AudioUnitGetParameter(d->mOutputUnit,
kHALOutputParam_Volume,
kAudioUnitScope_Global, 0, &volume))
return (int)lroundf(volume * 100.0f);
return (int)lroundf(volume * 100.0F);

return 0; // error case
}
Expand All @@ -450,7 +450,7 @@ void AudioOutputCA::SetVolumeChannel(int channel, int volume)
// FIXME: this only sets global volume
(void)channel;
AudioUnitSetParameter(d->mOutputUnit, kHALOutputParam_Volume,
kAudioUnitScope_Global, 0, (volume * 0.01f), 0);
kAudioUnitScope_Global, 0, (volume * 0.01F), 0);
}

// IOProc style callback for SPDIF audio output
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/audiooutputdx.cpp
Expand Up @@ -601,7 +601,7 @@ void AudioOutputDX::SetVolumeChannel(int channel, int volume)
{
HRESULT dsresult;
float dbAtten = 20 * log10((float)volume/100);
long dxVolume = (volume == 0) ? DSBVOLUME_MIN : (long)(100.0f * dbAtten);
long dxVolume = (volume == 0) ? DSBVOLUME_MIN : (long)(100.0F * dbAtten);

if (m_UseSPDIF)
return;
Expand Down

0 comments on commit 021489b

Please sign in to comment.