summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/audio_stream_sample.cpp4
-rw-r--r--scene/resources/bit_mask.cpp1
-rw-r--r--scene/resources/material.cpp2
-rw-r--r--scene/resources/mesh.cpp13
-rw-r--r--scene/resources/visual_shader.cpp8
5 files changed, 6 insertions, 22 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index 57d0deeb78..9ee85b64b6 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -562,13 +562,13 @@ void AudioStreamSample::save_to_wav(String p_path) {
PoolVector<uint8_t>::Read read_data = get_data().read();
switch (format) {
case AudioStreamSample::FORMAT_8_BITS:
- for (int i = 0; i < data_bytes; i++) {
+ for (unsigned int i = 0; i < data_bytes; i++) {
uint8_t data_point = (read_data[i] + 128);
file->store_8(data_point);
}
break;
case AudioStreamSample::FORMAT_16_BITS:
- for (int i = 0; i < data_bytes / 2; i++) {
+ for (unsigned int i = 0; i < data_bytes / 2; i++) {
uint16_t data_point = decode_uint16(&read_data[i * 2]);
file->store_16(data_point);
}
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index d670161afd..56b236d03b 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -183,7 +183,6 @@ Vector<Vector2> BitMap::_march_square(const Rect2i &rect, const Point2i &start)
unsigned int count = 0;
Set<Point2i> case9s;
Set<Point2i> case6s;
- int i;
Vector<Vector2> _points;
do {
int sv = 0;
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index cc8685b952..ce801c8763 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -427,10 +427,8 @@ void SpatialMaterial::_update_shader() {
if (flags[FLAG_USE_VERTEX_LIGHTING]) {
code += ",vertex_lighting";
}
- bool using_world = false;
if (flags[FLAG_TRIPLANAR_USE_WORLD] && (flags[FLAG_UV1_USE_TRIPLANAR] || flags[FLAG_UV2_USE_TRIPLANAR])) {
code += ",world_vertex_coords";
- using_world = true;
}
if (flags[FLAG_DONT_RECEIVE_SHADOWS]) {
code += ",shadows_disabled";
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 6426689397..fa87623e38 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -546,19 +546,6 @@ void Mesh::clear_cache() const {
Mesh::Mesh() {
}
-static const char *_array_name[] = {
- "vertex_array",
- "normal_array",
- "tangent_array",
- "color_array",
- "tex_uv_array",
- "tex_uv2_array",
- "bone_array",
- "weights_array",
- "index_array",
- NULL
-};
-
static const ArrayMesh::ArrayType _array_types[] = {
ArrayMesh::ARRAY_VERTEX,
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index f12ea8f2bb..96b9cfa137 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -796,10 +796,10 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
val.basis.transpose();
inputs[i] = "n_in" + itos(node) + "p" + itos(i);
Array values;
- for (int i = 0; i < 3; i++) {
- values.push_back(val.basis[i].x);
- values.push_back(val.basis[i].y);
- values.push_back(val.basis[i].z);
+ for (int j = 0; j < 3; j++) {
+ values.push_back(val.basis[j].x);
+ values.push_back(val.basis[j].y);
+ values.push_back(val.basis[j].z);
}
values.push_back(val.origin.x);
values.push_back(val.origin.y);