Cleanup: Clang-Tidy readability-const-return-type fixes

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2020-09-04 12:04:47 +02:00
parent 371ddda4d0
commit 8057ab10db
33 changed files with 100 additions and 103 deletions

View File

@ -14,7 +14,6 @@ Checks: >
-readability-inconsistent-declaration-parameter-name,
-readability-redundant-member-init,
-readability-const-return-type,
-readability-static-accessed-through-instance,
-readability-redundant-declaration,
-readability-qualified-auto,

View File

@ -371,7 +371,7 @@ struct VolumeGrid {
return NULL;
}
const bool grid_is_loaded() const
bool grid_is_loaded() const
{
return is_loaded;
}

View File

@ -421,7 +421,7 @@ const Polygon3r &CurvePoint::occludee() const
return __A->getFEdge(*__B)->occludee();
}
const bool CurvePoint::occludee_empty() const
bool CurvePoint::occludee_empty() const
{
if (__A == 0) {
return __B->occludee_empty();

View File

@ -325,7 +325,7 @@ class CurvePoint : public Interface0D {
int occluders_size() const;
const Polygon3r &occludee() const;
const SShape *occluded_shape() const;
const bool occludee_empty() const;
bool occludee_empty() const;
real z_discontinuity() const;
#if 0
float local_average_depth() const;

View File

@ -83,7 +83,7 @@ const SShape *SVertex::shape() const
return _Shape;
}
const int SVertex::qi() const
int SVertex::qi() const
{
if (getNature() & Nature::T_VERTEX) {
Exception::raiseException();
@ -139,7 +139,7 @@ const SShape *SVertex::occluded_shape() const
return (_FEdges[0])->occluded_shape();
}
const bool SVertex::occludee_empty() const
bool SVertex::occludee_empty() const
{
if (getNature() & Nature::T_VERTEX) {
Exception::raiseException();
@ -275,7 +275,7 @@ int FEdge::occluders_size() const
return _ViewEdge->occluders_size();
}
const bool FEdge::occludee_empty() const
bool FEdge::occludee_empty() const
{
return _ViewEdge->occludee_empty();
}

View File

@ -430,14 +430,14 @@ class SVertex : public Interface0D {
const SShape *shape() const;
float shape_importance() const;
const int qi() const;
int qi() const;
occluder_container::const_iterator occluders_begin() const;
occluder_container::const_iterator occluders_end() const;
bool occluders_empty() const;
int occluders_size() const;
const Polygon3r &occludee() const;
const SShape *occluded_shape() const;
const bool occludee_empty() const;
bool occludee_empty() const;
real z_discontinuity() const;
#if 0
inline float local_average_depth() const;
@ -907,7 +907,7 @@ class FEdge : public Interface1D {
}
#endif
const bool occludee_empty() const;
bool occludee_empty() const;
real z_discontinuity() const;
#if 0

View File

@ -67,7 +67,7 @@ class ABCAbstractWriter : public AbstractHierarchyWriter {
* is_supported(). */
virtual void create_alembic_objects(const HierarchyContext *context) = 0;
virtual const Alembic::Abc::OObject get_alembic_object() const = 0;
virtual Alembic::Abc::OObject get_alembic_object() const = 0;
protected:
virtual void do_write(HierarchyContext &context) = 0;

View File

@ -62,7 +62,7 @@ void ABCCameraWriter::create_alembic_objects(const HierarchyContext * /*context*
abc_custom_data_container_, "eyeSeparation", timesample_index_);
}
const Alembic::Abc::OObject ABCCameraWriter::get_alembic_object() const
Alembic::Abc::OObject ABCCameraWriter::get_alembic_object() const
{
return abc_camera_;
}

View File

@ -40,7 +40,7 @@ class ABCCameraWriter : public ABCAbstractWriter {
explicit ABCCameraWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual const Alembic::Abc::OObject get_alembic_object() const override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual bool is_supported(const HierarchyContext *context) const override;

View File

@ -63,7 +63,7 @@ void ABCCurveWriter::create_alembic_objects(const HierarchyContext *context)
user_prop_resolu.set(cu->resolu);
}
const Alembic::Abc::OObject ABCCurveWriter::get_alembic_object() const
Alembic::Abc::OObject ABCCurveWriter::get_alembic_object() const
{
return abc_curve_;
}

View File

@ -42,7 +42,7 @@ class ABCCurveWriter : public ABCAbstractWriter {
explicit ABCCurveWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual const Alembic::Abc::OObject get_alembic_object() const override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual void do_write(HierarchyContext &context) override;

View File

@ -59,7 +59,7 @@ void ABCHairWriter::create_alembic_objects(const HierarchyContext * /*context*/)
abc_curves_schema_ = abc_curves_.getSchema();
}
const Alembic::Abc::OObject ABCHairWriter::get_alembic_object() const
Alembic::Abc::OObject ABCHairWriter::get_alembic_object() const
{
return abc_curves_;
}

View File

@ -41,7 +41,7 @@ class ABCHairWriter : public ABCAbstractWriter {
explicit ABCHairWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual const Alembic::Abc::OObject get_alembic_object() const override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual void do_write(HierarchyContext &context) override;

View File

@ -119,7 +119,7 @@ ABCGenericMeshWriter::~ABCGenericMeshWriter()
{
}
const Alembic::Abc::OObject ABCGenericMeshWriter::get_alembic_object() const
Alembic::Abc::OObject ABCGenericMeshWriter::get_alembic_object() const
{
if (is_subd_) {
return abc_subdiv_;

View File

@ -56,7 +56,7 @@ class ABCGenericMeshWriter : public ABCAbstractWriter {
virtual ~ABCGenericMeshWriter();
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual const Alembic::Abc::OObject get_alembic_object() const override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual bool is_supported(const HierarchyContext *context) const override;

View File

@ -70,7 +70,7 @@ void ABCNurbsWriter::create_alembic_objects(const HierarchyContext *context)
}
}
const OObject ABCNurbsWriter::get_alembic_object() const
OObject ABCNurbsWriter::get_alembic_object() const
{
if (abc_nurbs_.empty()) {
return OObject();

View File

@ -36,7 +36,7 @@ class ABCNurbsWriter : public ABCAbstractWriter {
explicit ABCNurbsWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual const Alembic::Abc::OObject get_alembic_object() const override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
protected:
virtual bool is_supported(const HierarchyContext *context) const override;

View File

@ -55,7 +55,7 @@ void ABCPointsWriter::create_alembic_objects(const HierarchyContext * /*context*
abc_points_schema_ = abc_points_.getSchema();
}
const Alembic::Abc::OObject ABCPointsWriter::get_alembic_object() const
Alembic::Abc::OObject ABCPointsWriter::get_alembic_object() const
{
return abc_points_;
}

View File

@ -38,7 +38,7 @@ class ABCPointsWriter : public ABCAbstractWriter {
explicit ABCPointsWriter(const ABCWriterConstructorArgs &args);
virtual void create_alembic_objects(const HierarchyContext *context) override;
virtual const Alembic::Abc::OObject get_alembic_object() const override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
virtual bool is_supported(const HierarchyContext *context) const override;

View File

@ -96,7 +96,7 @@ void ABCTransformWriter::do_write(HierarchyContext &context)
write_visibility(context);
}
const OObject ABCTransformWriter::get_alembic_object() const
OObject ABCTransformWriter::get_alembic_object() const
{
return abc_xform_;
}

View File

@ -39,7 +39,7 @@ class ABCTransformWriter : public ABCAbstractWriter {
protected:
virtual void do_write(HierarchyContext &context) override;
virtual bool check_is_animated(const HierarchyContext &context) const override;
virtual const Alembic::Abc::OObject get_alembic_object() const override;
virtual Alembic::Abc::OObject get_alembic_object() const override;
};
} // namespace alembic

View File

@ -771,7 +771,7 @@ std::string AnimationExporter::collada_linear_interpolation_source(int tot,
return source_id;
}
const std::string AnimationExporter::get_collada_name(std::string channel_type) const
std::string AnimationExporter::get_collada_name(std::string channel_type) const
{
/*
* Translation table to map FCurve animation types to Collada animation.

View File

@ -239,7 +239,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
bool *has_tangents);
std::string get_axis_name(std::string channel, int id);
const std::string get_collada_name(std::string channel_target) const;
std::string get_collada_name(std::string channel_target) const;
std::string get_collada_sid(const BCAnimationCurve &curve, const std::string axis_name);
/* ===================================== */

View File

@ -977,7 +977,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
* If both values are specified, then the aspect ration is simply xfov/yfov
* and if aspect ratio is defined, then .. well then its that one.
*/
static const double get_aspect_ratio(const COLLADAFW::Camera *camera)
static double get_aspect_ratio(const COLLADAFW::Camera *camera)
{
double aspect = camera->getAspectRatio().getValue();

View File

@ -124,12 +124,12 @@ BCAnimationCurve::~BCAnimationCurve()
}
}
const bool BCAnimationCurve::is_of_animation_type(BC_animation_type type) const
bool BCAnimationCurve::is_of_animation_type(BC_animation_type type) const
{
return curve_key.get_animation_type() == type;
}
const std::string BCAnimationCurve::get_channel_target() const
std::string BCAnimationCurve::get_channel_target() const
{
const std::string path = curve_key.get_path();
@ -139,13 +139,13 @@ const std::string BCAnimationCurve::get_channel_target() const
return bc_string_after(path, ".");
}
const std::string BCAnimationCurve::get_channel_type() const
std::string BCAnimationCurve::get_channel_type() const
{
const std::string channel = get_channel_target();
return bc_string_after(channel, ".");
}
const std::string BCAnimationCurve::get_channel_posebone() const
std::string BCAnimationCurve::get_channel_posebone() const
{
const std::string channel = get_channel_target();
std::string pose_bone_name = bc_string_before(channel, ".");
@ -159,7 +159,7 @@ const std::string BCAnimationCurve::get_channel_posebone() const
return pose_bone_name;
}
const std::string BCAnimationCurve::get_animation_name(Object *ob) const
std::string BCAnimationCurve::get_animation_name(Object *ob) const
{
std::string name;
@ -201,22 +201,22 @@ const std::string BCAnimationCurve::get_animation_name(Object *ob) const
return name;
}
const int BCAnimationCurve::get_channel_index() const
int BCAnimationCurve::get_channel_index() const
{
return curve_key.get_array_index();
}
const int BCAnimationCurve::get_subindex() const
int BCAnimationCurve::get_subindex() const
{
return curve_key.get_subindex();
}
const std::string BCAnimationCurve::get_rna_path() const
std::string BCAnimationCurve::get_rna_path() const
{
return curve_key.get_path();
}
const int BCAnimationCurve::sample_count() const
int BCAnimationCurve::sample_count() const
{
if (fcurve == NULL) {
return 0;
@ -224,7 +224,7 @@ const int BCAnimationCurve::sample_count() const
return fcurve->totvert;
}
const int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const
int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const
{
if (fcurve == NULL) {
return -1;
@ -238,7 +238,7 @@ const int BCAnimationCurve::closest_index_above(const float sample_frame, const
return (fcurve->totvert > start_at + 1) ? start_at + 1 : start_at;
}
const int BCAnimationCurve::closest_index_below(const float sample_frame) const
int BCAnimationCurve::closest_index_below(const float sample_frame) const
{
if (fcurve == NULL) {
return -1;
@ -271,7 +271,7 @@ const int BCAnimationCurve::closest_index_below(const float sample_frame) const
return (fraction < 0.5) ? lower_index : upper_index;
}
const int BCAnimationCurve::get_interpolation_type(float sample_frame) const
int BCAnimationCurve::get_interpolation_type(float sample_frame) const
{
const int index = closest_index_below(sample_frame);
if (index < 0) {
@ -280,7 +280,7 @@ const int BCAnimationCurve::get_interpolation_type(float sample_frame) const
return fcurve->bezt[index].ipo;
}
const FCurve *BCAnimationCurve::get_fcurve() const
FCurve *BCAnimationCurve::get_fcurve() const
{
return fcurve;
}
@ -329,20 +329,20 @@ void BCAnimationCurve::clean_handles()
}
}
const bool BCAnimationCurve::is_transform_curve() const
bool BCAnimationCurve::is_transform_curve() const
{
std::string channel_type = this->get_channel_type();
return (is_rotation_curve() || channel_type == "scale" || channel_type == "location");
}
const bool BCAnimationCurve::is_rotation_curve() const
bool BCAnimationCurve::is_rotation_curve() const
{
std::string channel_type = this->get_channel_type();
return (channel_type == "rotation" || channel_type == "rotation_euler" ||
channel_type == "rotation_quaternion");
}
const float BCAnimationCurve::get_value(const float frame)
float BCAnimationCurve::get_value(const float frame)
{
if (fcurve) {
return evaluate_fcurve(fcurve, frame);
@ -590,22 +590,22 @@ void BCCurveKey::operator=(const BCCurveKey &other)
this->curve_subindex = other.curve_subindex;
}
const std::string BCCurveKey::get_full_path() const
std::string BCCurveKey::get_full_path() const
{
return this->rna_path + '[' + std::to_string(this->curve_array_index) + ']';
}
const std::string BCCurveKey::get_path() const
std::string BCCurveKey::get_path() const
{
return this->rna_path;
}
const int BCCurveKey::get_array_index() const
int BCCurveKey::get_array_index() const
{
return this->curve_array_index;
}
const int BCCurveKey::get_subindex() const
int BCCurveKey::get_subindex() const
{
return this->curve_subindex;
}
@ -615,12 +615,12 @@ void BCCurveKey::set_object_type(BC_animation_type object_type)
this->key_type = object_type;
}
const BC_animation_type BCCurveKey::get_animation_type() const
BC_animation_type BCCurveKey::get_animation_type() const
{
return this->key_type;
}
const bool BCCurveKey::operator<(const BCCurveKey &other) const
bool BCCurveKey::operator<(const BCCurveKey &other) const
{
/* needed for using this class as key in maps and sets */
if (this->key_type != other.key_type) {
@ -642,22 +642,22 @@ BCBezTriple::BCBezTriple(BezTriple &bezt) : bezt(bezt)
{
}
const float BCBezTriple::get_frame() const
float BCBezTriple::get_frame() const
{
return bezt.vec[1][0];
}
const float BCBezTriple::get_time(Scene *scene) const
float BCBezTriple::get_time(Scene *scene) const
{
return FRA2TIME(bezt.vec[1][0]);
}
const float BCBezTriple::get_value() const
float BCBezTriple::get_value() const
{
return bezt.vec[1][1];
}
const float BCBezTriple::get_angle() const
float BCBezTriple::get_angle() const
{
return RAD2DEGF(get_value());
}

View File

@ -62,13 +62,13 @@ class BCCurveKey {
const int array_index,
const int subindex = -1);
void operator=(const BCCurveKey &other);
const std::string get_full_path() const;
const std::string get_path() const;
const int get_array_index() const;
const int get_subindex() const;
std::string get_full_path() const;
std::string get_path() const;
int get_array_index() const;
int get_subindex() const;
void set_object_type(BC_animation_type object_type);
const BC_animation_type get_animation_type() const;
const bool operator<(const BCCurveKey &other) const;
BC_animation_type get_animation_type() const;
bool operator<(const BCCurveKey &other) const;
};
class BCBezTriple {
@ -76,10 +76,10 @@ class BCBezTriple {
BezTriple &bezt;
BCBezTriple(BezTriple &bezt);
const float get_frame() const;
const float get_time(Scene *scene) const;
const float get_value() const;
const float get_angle() const;
float get_frame() const;
float get_time(Scene *scene) const;
float get_value() const;
float get_angle() const;
void get_in_tangent(Scene *scene, float point[2], bool as_angle) const;
void get_out_tangent(Scene *scene, float point[2], bool as_angle) const;
void get_tangent(Scene *scene, float point[2], bool as_angle, int index) const;
@ -108,26 +108,26 @@ class BCAnimationCurve {
BCAnimationCurve(BCCurveKey key, Object *ob, FCurve *fcu);
~BCAnimationCurve();
const bool is_of_animation_type(BC_animation_type type) const;
const int get_interpolation_type(float sample_frame) const;
bool is_of_animation_type(BC_animation_type type) const;
int get_interpolation_type(float sample_frame) const;
bool is_animated();
const bool is_transform_curve() const;
const bool is_rotation_curve() const;
bool is_transform_curve() const;
bool is_rotation_curve() const;
bool is_keyframe(int frame);
void adjust_range(int frame);
const std::string get_animation_name(Object *ob) const; /* xxx: this is collada specific */
const std::string get_channel_target() const;
const std::string get_channel_type() const;
const std::string get_channel_posebone() const; // returns "" if channel is not a bone channel
std::string get_animation_name(Object *ob) const; /* xxx: this is collada specific */
std::string get_channel_target() const;
std::string get_channel_type() const;
std::string get_channel_posebone() const; // returns "" if channel is not a bone channel
const int get_channel_index() const;
const int get_subindex() const;
const std::string get_rna_path() const;
const FCurve *get_fcurve() const;
const int sample_count() const;
int get_channel_index() const;
int get_subindex() const;
std::string get_rna_path() const;
FCurve *get_fcurve() const;
int sample_count() const;
const float get_value(const float frame);
float get_value(const float frame);
void get_values(BCValues &values) const;
void get_value_map(BCValueMap &value_map);
@ -141,8 +141,8 @@ class BCAnimationCurve {
void clean_handles();
/* experimental stuff */
const int closest_index_above(const float sample_frame, const int start_at) const;
const int closest_index_below(const float sample_frame) const;
int closest_index_above(const float sample_frame, const int start_at) const;
int closest_index_below(const float sample_frame) const;
};
typedef std::map<BCCurveKey, BCAnimationCurve *> BCAnimationCurveMap;

View File

@ -549,13 +549,13 @@ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob, Bone *bone) const
}
/* Check if the key is in this BCSampleFrame */
const bool BCSampleFrame::has_sample_for(Object *ob) const
bool BCSampleFrame::has_sample_for(Object *ob) const
{
return sampleMap.find(ob) != sampleMap.end();
}
/* Check if the Bone is in this BCSampleFrame */
const bool BCSampleFrame::has_sample_for(Object *ob, Bone *bone) const
bool BCSampleFrame::has_sample_for(Object *ob, Bone *bone) const
{
const BCMatrix *bc_bone = get_sample_matrix(ob, bone);
return bc_bone;
@ -582,7 +582,7 @@ BCSampleFrame *BCSampleFrameContainer::get_frame(int frame_index)
}
/* Return a list of all frames that need to be sampled */
const int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
{
frames.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@ -592,7 +592,7 @@ const int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
return frames.size();
}
const int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
{
frames.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@ -605,7 +605,7 @@ const int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
return frames.size();
}
const int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &frames) const
int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &frames) const
{
frames.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@ -618,7 +618,7 @@ const int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &f
return frames.size();
}
const int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samples) const
int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samples) const
{
samples.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@ -632,7 +632,7 @@ const int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samp
return samples.size();
}
const int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &samples) const
int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &samples) const
{
samples.clear(); // safety;
BCSampleFrameMap::const_iterator it;
@ -646,9 +646,7 @@ const int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &sa
return samples.size();
}
const int BCSampleFrameContainer::get_matrices(Object *ob,
Bone *bone,
BCMatrixSampleMap &samples) const
int BCSampleFrameContainer::get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &samples) const
{
samples.clear(); // safety;
BCSampleFrameMap::const_iterator it;

View File

@ -92,8 +92,8 @@ class BCSampleFrame {
const BCMatrix *get_sample_matrix(Object *ob) const;
const BCMatrix *get_sample_matrix(Object *ob, Bone *bone) const;
const bool has_sample_for(Object *ob) const;
const bool has_sample_for(Object *ob, Bone *bone) const;
bool has_sample_for(Object *ob) const;
bool has_sample_for(Object *ob, Bone *bone) const;
};
typedef std::map<int, BCSampleFrame> BCSampleFrameMap;
@ -135,13 +135,13 @@ class BCSampleFrameContainer {
BCSample &add(Object *ob, int frame_index);
BCSampleFrame *get_frame(int frame_index); // returns NULL if frame does not exist
const int get_frames(std::vector<int> &frames) const;
const int get_frames(Object *ob, BCFrames &frames) const;
const int get_frames(Object *ob, Bone *bone, BCFrames &frames) const;
int get_frames(std::vector<int> &frames) const;
int get_frames(Object *ob, BCFrames &frames) const;
int get_frames(Object *ob, Bone *bone, BCFrames &frames) const;
const int get_samples(Object *ob, BCFrameSampleMap &samples) const;
const int get_matrices(Object *ob, BCMatrixSampleMap &matrices) const;
const int get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &bones) const;
int get_samples(Object *ob, BCFrameSampleMap &samples) const;
int get_matrices(Object *ob, BCMatrixSampleMap &matrices) const;
int get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &bones) const;
};
class BCAnimationSampler {

View File

@ -216,7 +216,7 @@ void BCMatrix::get_matrix(Matrix &mat,
}
}
const bool BCMatrix::in_range(const BCMatrix &other, float distance) const
bool BCMatrix::in_range(const BCMatrix &other, float distance) const
{
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {

View File

@ -98,7 +98,7 @@ class BCMatrix {
void add_transform(const BCMatrix &matrix, const bool inverted = false);
void apply_transform(const BCMatrix &matrix, const bool inverted = false);
const bool in_range(const BCMatrix &other, float distance) const;
bool in_range(const BCMatrix &other, float distance) const;
static void sanitize(Matrix &matrix, int precision);
static void sanitize(DMatrix &matrix, int precision);

View File

@ -40,7 +40,7 @@ void BCSample::add_bone_matrix(Bone *bone, Matrix &mat)
}
/* Get channel value */
const bool BCSample::get_value(std::string channel_target, const int array_index, float *val) const
bool BCSample::get_value(std::string channel_target, const int array_index, float *val) const
{
std::string bname = bc_string_before(channel_target, ".");
std::string channel_type = bc_string_after(channel_target, ".");

View File

@ -53,7 +53,7 @@ class BCSample {
void add_bone_matrix(Bone *bone, Matrix &mat);
const bool get_value(std::string channel_target, const int array_index, float *val) const;
bool get_value(std::string channel_target, const int array_index, float *val) const;
const BCMatrix &get_matrix() const;
const BCMatrix *get_matrix(Bone *bone) const; // returns NULL if bone is not animated
};

View File

@ -48,7 +48,7 @@
#include "collada_utils.h"
// get node name, or fall back to original id if not present (name is optional)
template<class T> static const std::string bc_get_dae_name(T *node)
template<class T> static std::string bc_get_dae_name(T *node)
{
return node->getName().empty() ? node->getOriginalId() : node->getName();
}