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
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-05-26 13:56:27 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-05-30 14:47:51 +0300
commit4aeba3b90dac780d25fd04c174b5cdc4da53efd5 (patch)
tree09724ea8491b1a075aa1686d653ccf734a749bf1 /source/blender/alembic
parentcfce8623a808d04904e00ac93d7d90d369a569e8 (diff)
Alembic export: avoid create-and-reset of shared pointer
Constructing the shared pointer where the object is actually allocated makes the code a bit clearer.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_exporter.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc
index ced58e4964e..0c0d73713fb 100644
--- a/source/blender/alembic/intern/abc_exporter.cc
+++ b/source/blender/alembic/intern/abc_exporter.cc
@@ -219,20 +219,17 @@ void AbcExporter::getShutterSamples(double step, bool time_relative,
Alembic::Abc::TimeSamplingPtr AbcExporter::createTimeSampling(double step)
{
- TimeSamplingPtr time_sampling;
std::vector<double> samples;
if (m_settings.frame_start == m_settings.frame_end) {
- time_sampling.reset(new Alembic::Abc::TimeSampling());
- return time_sampling;
+ return TimeSamplingPtr(new Alembic::Abc::TimeSampling());
}
getShutterSamples(step, true, samples);
Alembic::Abc::TimeSamplingType ts(static_cast<uint32_t>(samples.size()), 1.0 / m_scene->r.frs_sec);
- time_sampling.reset(new Alembic::Abc::TimeSampling(ts, samples));
- return time_sampling;
+ return TimeSamplingPtr(new Alembic::Abc::TimeSampling(ts, samples));
}
void AbcExporter::getFrameSet(double step, std::set<double> &frames)