summaryrefslogtreecommitdiffstats
path: root/source/core/slang-file-system.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-11-06 01:47:26 +0800
committerGitHub <noreply@github.com>2024-11-05 09:47:26 -0800
commitb118451e301d734e3e783b3acdf871f3f6ea851c (patch)
tree277f160d31e2c442f724bc6a2d3c09fabff403ca /source/core/slang-file-system.cpp
parent53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (diff)
Move switch statement bodies to their own lines (#5493)
* Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/core/slang-file-system.cpp')
-rw-r--r--source/core/slang-file-system.cpp35
1 files changed, 24 insertions, 11 deletions
diff --git a/source/core/slang-file-system.cpp b/source/core/slang-file-system.cpp
index 3e129f7bf..309b8c128 100644
--- a/source/core/slang-file-system.cpp
+++ b/source/core/slang-file-system.cpp
@@ -225,9 +225,14 @@ SlangResult OSFileSystem::enumeratePathContents(
SlangPathType pathType;
switch (type)
{
- case Path::Type::File: pathType = SLANG_PATH_TYPE_FILE; break;
- case Path::Type::Directory: pathType = SLANG_PATH_TYPE_DIRECTORY; break;
- default: return;
+ case Path::Type::File:
+ pathType = SLANG_PATH_TYPE_FILE;
+ break;
+ case Path::Type::Directory:
+ pathType = SLANG_PATH_TYPE_DIRECTORY;
+ break;
+ default:
+ return;
}
m_callback(pathType, m_buffer.getBuffer(), m_userData);
@@ -298,9 +303,12 @@ SlangResult OSFileSystem::createDirectory(const char* path)
}
switch (res)
{
- case SLANG_E_CANNOT_OPEN: return CompressedResult::CannotOpen;
- case SLANG_E_NOT_FOUND: return CompressedResult::NotFound;
- default: return CompressedResult::Fail;
+ case SLANG_E_CANNOT_OPEN:
+ return CompressedResult::CannotOpen;
+ case SLANG_E_NOT_FOUND:
+ return CompressedResult::NotFound;
+ default:
+ return CompressedResult::Fail;
}
}
@@ -377,7 +385,8 @@ void CacheFileSystem::setInnerFileSystem(
: UniqueIdentityMode::SimplifyPathAndHash;
break;
}
- default: break;
+ default:
+ break;
}
if (pathStyle == PathStyle::Default)
@@ -779,9 +788,12 @@ SlangResult CacheFileSystem::getPath(PathKind kind, const char* path, ISlangBlob
{
switch (kind)
{
- case PathKind::Simplified: return _getSimplifiedPath(path, outPath);
- case PathKind::Canonical: return _getCanonicalPath(path, outPath);
- default: break;
+ case PathKind::Simplified:
+ return _getSimplifiedPath(path, outPath);
+ case PathKind::Canonical:
+ return _getCanonicalPath(path, outPath);
+ default:
+ break;
}
if (m_fileSystemExt)
@@ -813,7 +825,8 @@ SlangResult CacheFileSystem::_getSimplifiedPath(const char* path, ISlangBlob** o
*outSimplifiedPath = StringUtil::createStringBlob(simplifiedPath).detach();
return SLANG_OK;
}
- default: return SLANG_E_NOT_IMPLEMENTED;
+ default:
+ return SLANG_E_NOT_IMPLEMENTED;
}
}