Skip to content

Commit 4c7c779

Browse files
committed
Updated to use new vsg::clone() function.
1 parent 7cc6f08 commit 4c7c779

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/assimp/SceneConverter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ SamplerData SceneConverter::convertTexture(const aiMaterial& material, aiTexture
394394
vsg::debug("filename = ", filename, " : Embedded compressed format texture->achFormatHint = ", texture->achFormatHint);
395395

396396
// texture is a compressed format, defer to the VSG's vsg::read() to convert the block of data to vsg::Data image.
397-
auto imageOptions = vsg::Options::create(*options);
397+
auto imageOptions = vsg::clone(options);
398398
imageOptions->extensionHint = vsg::Path(".") + texture->achFormatHint;
399399
samplerImage.data = vsg::read_cast<vsg::Data>(reinterpret_cast<const uint8_t*>(texture->pcData), texture->mWidth, imageOptions);
400400

src/assimp/assimp.cpp

+1-11
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ vsg::ref_ptr<vsg::Object> assimp::Implementation::read(const vsg::Path& filename
141141

142142
if (auto scene = importer.ReadFile(filenameToUse.string(), flags); scene)
143143
{
144-
auto opt = vsg::Options::create(*options);
144+
auto opt = vsg::clone(options);
145145
opt->paths.insert(opt->paths.begin(), vsg::filePath(filenameToUse));
146146

147147
SceneConverter converter;
@@ -162,16 +162,6 @@ vsg::ref_ptr<vsg::Object> assimp::Implementation::read(const vsg::Path& filename
162162
}
163163
}
164164

165-
#if 0
166-
// Testing the stream support
167-
std::ifstream file(filename, std::ios::binary);
168-
auto opt = vsg::Options::create(*options);
169-
opt->paths.push_back(vsg::filePath(filename));
170-
opt->extensionHint = vsg::lowerCaseFileExtension(filename);
171-
172-
return vsg::read(file, opt);
173-
#endif
174-
175165
return {};
176166
}
177167

src/curl/curl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ vsg::ref_ptr<vsg::Object> curl::read(const vsg::Path& filename, vsg::ref_ptr<con
104104
auto fileCachePath = getFileCachePath(options->fileCache, serverFilename);
105105
if (vsg::fileExists(fileCachePath))
106106
{
107-
auto local_options = vsg::Options::create(*options);
107+
auto local_options = vsg::clone(options);
108108

109109
local_options->paths.insert(local_options->paths.begin(), vsg::filePath(serverFilename));
110110
local_options->extensionHint = vsg::lowerCaseFileExtension(filename);
@@ -225,7 +225,7 @@ vsg::ref_ptr<vsg::Object> curl::Implementation::read(const vsg::Path& filename,
225225
if (result == 0 && response_code >= 200 && response_code<300) // successful responses.
226226
{
227227
// success
228-
auto local_options = vsg::Options::create(*options);
228+
auto local_options = vsg::clone(options);
229229
local_options->paths.insert(local_options->paths.begin(), vsg::filePath(filename));
230230
if (!local_options->extensionHint)
231231
{

0 commit comments

Comments
 (0)