CLEANUP: some compiler and static analysis warnings

This commit is contained in:
vsonnier
2017-01-28 14:57:27 +01:00
parent af6a32902f
commit 115b0ffa58
44 changed files with 97 additions and 93 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ public:
GLFontStringCache();
int drawlen;
int vpx, vpy;
int pxHeight;
float msgWidth;
int pxHeight = 0;
float msgWidth = 0.0f;
std::atomic_int gc;
std::vector<float> gl_vertices;
std::vector<float> gl_uv;
+4 -4
View File
@@ -24,19 +24,19 @@ std::vector<float> &Gradient::getBlue() {
}
void Gradient::generate(unsigned int len) {
unsigned int chunk_size = len / (colors.size() - 1);
size_t chunk_size = len / (colors.size() - 1);
unsigned int p = 0;
size_t p = 0;
r_val.resize(len);
g_val.resize(len);
b_val.resize(len);
for (unsigned int j = 0, jMax = colors.size() - 1; j < jMax; j++) {
for (size_t j = 0, jMax = colors.size() - 1; j < jMax; j++) {
if ((chunk_size * (jMax)) < len && (j == jMax - 1)) {
chunk_size += len - chunk_size * (jMax);
}
for (unsigned int i = 0; i < chunk_size; i++) {
for (size_t i = 0; i < chunk_size; i++) {
float idx = (float) (i) / (float) chunk_size;
float r1 = colors[j].r;
+1 -1
View File
@@ -56,7 +56,7 @@ void Timer::unlock()
update();
last_update = system_milliseconds-lock_rate;
last_update = system_milliseconds-(unsigned long)lock_rate;
offset += msec_tmp-system_milliseconds;