diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-09-17 09:18:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-17 09:18:57 -0400 |
| commit | 24ad492a98dc99abfbf7523b50bbdb13274c097e (patch) | |
| tree | a84e609f8bf2e5add2b5e009b42fa564149cefdd /examples/model-viewer/main.cpp | |
| parent | 3c505c22673701339d35eb2151f01c16eb3c78c3 (diff) | |
Hotfix/fixing warnings (#636)
* * Remove dispose from IRInst
* Use MemoryArena instead of MemoryPool
* Make all IRInst not require Dtor - by having ref counted array store ptrs that need freeing
* Increase block size - typically compilation is 2Mb of IR space(!)
* Fix issues around StringRepresentation::equal because null has special meaning.
* Don't bother to construct as String to compare StringRepresentation, just used UnownedStringSlice.
* Added fromLiteral support to UnownedStringSlice and use instead of strlen version.
* Use more conventional way to test StringRepresentation against a String.
* Fix gcc/clang template problem with cast.
* Fix warnings.
Diffstat (limited to 'examples/model-viewer/main.cpp')
| -rw-r--r-- | examples/model-viewer/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/model-viewer/main.cpp b/examples/model-viewer/main.cpp index be2e6878f..c1f7980cf 100644 --- a/examples/model-viewer/main.cpp +++ b/examples/model-viewer/main.cpp @@ -576,7 +576,7 @@ struct ParameterBlockEncoder { assert(slangTypeLayout->getKind() == slang::TypeReflection::Kind::Struct); - auto slangField = slangTypeLayout->getFieldByIndex(fieldIndex); + auto slangField = slangTypeLayout->getFieldByIndex((unsigned int)fieldIndex); auto fieldUniformOffset = slangField->getOffset(); // TODO: this type needs to be extended to handle resource fields. @@ -881,7 +881,7 @@ RefPtr<EffectVariant> createEffectVaraint( int translationUnitIndex = spAddTranslationUnit(slangRequest, SLANG_SOURCE_LANGUAGE_SLANG, nullptr); spAddTranslationUnitSourceFile(slangRequest, translationUnitIndex, program->shaderModule->inputPath.c_str()); - int entryPointCont = program->entryPoints.size(); + const int entryPointCont = int(program->entryPoints.size()); for(int ii = 0; ii < entryPointCont; ++ii) { auto entryPoint = program->entryPoints[ii]; @@ -895,7 +895,7 @@ RefPtr<EffectVariant> createEffectVaraint( translationUnitIndex, entryPoint->name.c_str(), entryPoint->slangStage, - genericArgs.size(), + int(genericArgs.size()), genericArgs.data()); } @@ -1877,7 +1877,7 @@ struct LightEnv : public RefObject // The more interesting case is when we have a `LightArray<L,N>`, // in which case we need to encode the first field (the light count)... // - lightTypeEncoder.writeField<int32_t>(0, lightTypeArray->lights.size()); + lightTypeEncoder.writeField<int32_t>(0, int32_t(lightTypeArray->lights.size())); // // ... followed by an array of values of type `L` in the second field. // We will only write to the first `lightCount` entries, which may be |
