Skip to content
This repository was archived by the owner on Dec 12, 2020. It is now read-only.

Commit c718f1d

Browse files
rm warnings
1 parent 5495450 commit c718f1d

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • Assignments/Image-Height-Map/src

Assignments/Image-Height-Map/src/IHM.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ using cimg_library::CImgDisplay;
4646
// Function Declaration
4747
const unsigned int GetUserInputMultiple(const unsigned int& lower, const unsigned int& upper, const unsigned int& multiple);
4848
const unsigned long CalcHexColorFromPixelVal(const float& pixel_value);
49-
double GetUserInputFraction(const double& precision = 0.1);
49+
float GetUserInputFraction(const float& precision = 0.1);
5050
void GenerateCatmuls(CImg<float>* image, const std::vector<glm::vec3>& all_vecticies);
5151
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode);
5252
void mouse_callback(GLFWwindow* window, int button, int action, int mods);
@@ -220,9 +220,9 @@ const unsigned long CalcHexColorFromPixelVal(const float & pixel_value)
220220
return static_cast<unsigned long>(std::floor(std::pow(pixel_value, 2.0))); // blue to green
221221
}
222222

223-
double GetUserInputFraction(const double& precision)
223+
float GetUserInputFraction(const float& precision)
224224
{
225-
double selection = 0.0;
225+
float selection = 0.0;
226226
do
227227
{
228228
std::cout << "Selcetion: ";
@@ -236,7 +236,7 @@ double GetUserInputFraction(const double& precision)
236236

237237
} while (selection < 0.0 || selection > 1.0);
238238

239-
return floor(selection / precision + 0.5) * precision; // https://stackoverflow.com/a/798070/8480874
239+
return floor(selection / precision + 0.5f) * precision; // https://stackoverflow.com/a/798070/8480874
240240
}
241241

242242
void GenerateCatmuls(CImg<float>* image, const std::vector<glm::vec3>& all_vecticies)
@@ -292,13 +292,13 @@ void GenerateCatmuls(CImg<float>* image, const std::vector<glm::vec3>& all_vecti
292292
{ // this is the long (lazy way) to find length ... i couldnt figure out equation
293293
if (verticies_x_catmul.at(0).x + skip_size == verticies_x_catmul.at(index).x) // this is the long (lazy way) to find length ... i couldnt figure out equation
294294
{ // this is the long (lazy way) to find length ... i couldnt figure out equation
295-
points_per_row = index + 1; // this is the long (lazy way) to find length ... i couldnt figure out equation
295+
points_per_row = (unsigned int)index + 1; // this is the long (lazy way) to find length ... i couldnt figure out equation
296296
break; // this is the long (lazy way) to find length ... i couldnt figure out equation
297297
} // this is the long (lazy way) to find length ... i couldnt figure out equation
298298
} // this is the long (lazy way) to find length ... i couldnt figure out equation
299299

300300
// Indicies
301-
for (size_t index = 0; index < verticies_x_catmul.size() - 1; index += 1) // for each point
301+
for (GLuint index = 0; index < verticies_x_catmul.size() - 1; index += 1) // for each point
302302
{
303303
if( index + points_per_row + 1 >= verticies_x_catmul.size()) continue;
304304
if (verticies_x_catmul.at(index).x != verticies_x_catmul.at(index + 1).x) continue; // ignoring edges
@@ -360,17 +360,17 @@ void GenerateCatmuls(CImg<float>* image, const std::vector<glm::vec3>& all_vecti
360360
}
361361

362362
points_per_row = 0; // this is the long (lazy way) to find length ... i couldnt figure out equation
363-
for (size_t index = 0; index < verticies_xz_catmul.size(); index += 1) // this is the long (lazy way) to find length ... i couldnt figure out equation
363+
for (GLuint index = 0; index < verticies_xz_catmul.size(); index += 1) // this is the long (lazy way) to find length ... i couldnt figure out equation
364364
{ // this is the long (lazy way) to find length ... i couldnt figure out equation
365365
if (verticies_xz_catmul.at(0).x + skip_size == verticies_xz_catmul.at(index).x) // this is the long (lazy way) to find length ... i couldnt figure out equation
366366
{ // this is the long (lazy way) to find length ... i couldnt figure out equation
367-
points_per_row = index + 1; // this is the long (lazy way) to find length ... i couldnt figure out equation
367+
points_per_row = (unsigned int)index + 1; // this is the long (lazy way) to find length ... i couldnt figure out equation
368368
break; // this is the long (lazy way) to find length ... i couldnt figure out equation
369369
} // this is the long (lazy way) to find length ... i couldnt figure out equation
370370
} // this is the long (lazy way) to find length ... i couldnt figure out equation
371371

372372
// Indicies
373-
for (size_t index = 0; index < verticies_xz_catmul.size() - 1; index += 1) // for every single damn point.............................................
373+
for (GLuint index = 0; index < verticies_xz_catmul.size() - 1; index += 1) // for every single damn point.............................................
374374
{
375375
if (index + points_per_row + 1 >= verticies_xz_catmul.size()) continue;
376376
if (verticies_xz_catmul.at(index).x != verticies_xz_catmul.at(index + 1).x) continue; // ignore edges

0 commit comments

Comments
 (0)