Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-28 20:45:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-28 20:45:01 +0400
commit6cb896ff0a7d24be3ff500585642ae5d61a5b788 (patch)
tree84b6b1d6f71eec23e9a986470e916f059c323ef4 /intern
parent4a903395194aef1cfe97e4d50d73320a72280cf3 (diff)
Cycles: fix msvc compile warning, patch by Jason Wilkins.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/render/attribute.cpp7
-rw-r--r--intern/cycles/render/attribute.h2
-rw-r--r--intern/cycles/render/mesh.cpp3
3 files changed, 7 insertions, 5 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index aa18ca7d7cb..9e90bf1b625 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -101,9 +101,9 @@ ustring Attribute::standard_name(Attribute::Standard std)
/* Attribute Set */
-AttributeSet::AttributeSet(Mesh *mesh_)
+AttributeSet::AttributeSet()
{
- mesh = mesh_;
+ mesh = NULL;
}
AttributeSet::~AttributeSet()
@@ -133,7 +133,8 @@ Attribute *AttributeSet::add(ustring name, TypeDesc type, Attribute::Element ele
else if(element == Attribute::CORNER)
attr->set(name, type, element);
- attr->reserve(mesh->verts.size(), mesh->triangles.size());
+ if(mesh)
+ attr->reserve(mesh->verts.size(), mesh->triangles.size());
return attr;
}
diff --git a/intern/cycles/render/attribute.h b/intern/cycles/render/attribute.h
index aef215d6c0c..7af4657daa3 100644
--- a/intern/cycles/render/attribute.h
+++ b/intern/cycles/render/attribute.h
@@ -94,7 +94,7 @@ public:
Mesh *mesh;
list<Attribute> attributes;
- AttributeSet(Mesh *mesh);
+ AttributeSet();
~AttributeSet();
Attribute *add(ustring name, TypeDesc type, Attribute::Element element);
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index cd533f24058..a7eb365f983 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -38,7 +38,6 @@ CCL_NAMESPACE_BEGIN
/* Mesh */
Mesh::Mesh()
-: attributes(this)
{
need_update = true;
transform_applied = false;
@@ -49,6 +48,8 @@ Mesh::Mesh()
tri_offset = 0;
vert_offset = 0;
+
+ attributes.mesh = this;
}
Mesh::~Mesh()