Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Qi Wu committed Feb 15, 2024
1 parent fe893d2 commit 654a81e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ovr/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,15 @@ MainRenderer::set_scene(const Scene& scene)
std::vector<float> tfn_alphas;
vec2f tfn_value_range = { 1, -1 };

for (int i = 0; i < size_c; ++i) {
float p = (float)i / (size_c - 1);
for (size_t i = 0; i < size_c; ++i) {
// float p = (float)i / (size_c - 1);
// tfn_colors.push_back(p);
tfn_colors.push_back(data_c[i].x);
tfn_colors.push_back(data_c[i].y);
tfn_colors.push_back(data_c[i].z);
}

for (int i = 0; i < size_o; ++i) {
for (size_t i = 0; i < size_o; ++i) {
float p = (float)i / (size_o - 1);
tfn_alphas.push_back(p);
tfn_alphas.push_back(data_o[i]);
Expand Down
2 changes: 1 addition & 1 deletion ovr/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ parse_single_volume_scene(const scene::Scene& scene, scene::Volume::VolumeType v
if (scene.instances[0].models[0].type != scene::Model::VOLUMETRIC_MODEL) throw std::runtime_error("expect a volume model");
// check texture type
int32_t tex = scene.instances[0].models[0].volume_model.volume_texture;
if (tex < 0 && tex >= scene.textures.size()) throw std::runtime_error("invalid texture index: " + std::to_string(tex));
if (tex < 0 && tex >= (int32_t)scene.textures.size()) throw std::runtime_error("invalid texture index: " + std::to_string(tex));
if (scene.textures[tex].type != scene::Texture::VOLUME_TEXTURE) throw std::runtime_error("expect a volume texture");
// check volume type
if (scene.textures[tex].volume.volume.type != vtype) throw std::runtime_error("expect a volume of type: " + std::to_string((int)vtype));
Expand Down

0 comments on commit 654a81e

Please sign in to comment.