diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2016-07-06 19:04:21 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-07-07 23:15:59 +0200 |
| commit | 3fcb9b1ec179b99d979d4cfea9b5e3c80e4a3e33 (patch) | |
| tree | a9ab363b5d34a3e314883618c6f34d5368ca79a8 /tools/editor/plugins/sample_editor_plugin.cpp | |
| parent | b6ac91c0e6416eda0dec226c5dbe5716f293e4f6 (diff) | |
| download | redot-engine-3fcb9b1ec179b99d979d4cfea9b5e3c80e4a3e33.tar.gz | |
Removed unused variables (second pass) + dead code
Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable
Diffstat (limited to 'tools/editor/plugins/sample_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/sample_editor_plugin.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp index 69602ac995..7965fa54ae 100644 --- a/tools/editor/plugins/sample_editor_plugin.cpp +++ b/tools/editor/plugins/sample_editor_plugin.cpp @@ -151,7 +151,7 @@ void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<Imag -1, -1, -1, -1, 2, 4, 6, 8 }; - int16_t nibble,signed_nibble,diff,step; + int16_t nibble,diff,step; ima_adpcm.last_nibble++; const uint8_t *src_ptr=sdata; @@ -172,10 +172,6 @@ void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<Imag if (ima_adpcm.step_index>88) ima_adpcm.step_index=88; - /* - signed_nibble = (nibble&7) * ((nibble&8)?-1:1); - diff = (2 * signed_nibble + 1) * step / 4; */ - diff = step >> 3 ; if (nibble & 1) diff += step >> 2 ; @@ -285,15 +281,13 @@ void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<Imag for(int j=0;j<h;j++) { - int half,ofs; + int half; float v; if (j<(h/2)) { half=0; - ofs=0; v = (j/(float)(h/2)) * 2.0 - 1.0; } else { half=1; - ofs=h/2; v = ((j-(h/2))/(float)(h/2)) * 2.0 - 1.0; } |
