Skip to content

Commit cadcee5

Browse files
shoot down more errors and warnings about return types
1 parent 98c701a commit cadcee5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

include/nbl/asset/ICPUShader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,15 @@ class ICPUShader : public IAsset, public IShader
9595
if(isImmutable_debug())
9696
return m_shaderStage == stage;
9797
m_shaderStage = stage;
98+
return true;
9899
}
99100

100101
bool setFilePathHint(std::string&& filepathHint)
101102
{
102103
if(isImmutable_debug())
103104
return false;
104105
m_filepathHint = std::move(filepathHint);
106+
return true;
105107
}
106108

107109
bool canBeRestoredFrom(const IAsset* _other) const override

include/nbl/asset/utils/CDirQuantCacheBase.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class CDirQuantCacheBase : public impl::CDirQuantCacheBase
340340

341341
//!
342342
template<E_FORMAT CacheFormat>
343-
inline system::IFile::success_t saveCacheToFile(system::IFile* file)
343+
inline bool saveCacheToFile(system::IFile* file)
344344
{
345345
if (!file)
346346
return false;
@@ -354,20 +354,20 @@ class CDirQuantCacheBase : public impl::CDirQuantCacheBase
354354

355355
system::IFile::success_t succ;
356356
file->write(succ,bufferRange.buffer->getPointer(), 0, bufferRange.buffer->getSize());
357-
return succ;
357+
return bool(succ);
358358
}
359359

360360
//!
361361
template<E_FORMAT CacheFormat>
362-
inline system::IFile::success_t saveCacheToFile(nbl::system::ISystem* system, const system::path& path)
362+
inline bool saveCacheToFile(nbl::system::ISystem* system, const system::path& path)
363363
{
364364
system::ISystem::future_t<core::smart_refctd_ptr<system::IFile>> future;
365365
system->createFile(future, path, nbl::system::IFile::ECF_WRITE);
366366
auto file = future.get();
367367
if (!file)
368368
return false;
369369

370-
return saveCacheToFile<CacheFormat>(file.get());
370+
return bool(saveCacheToFile<CacheFormat>(file.get()));
371371
}
372372

373373
//!

0 commit comments

Comments
 (0)