Update clang-format again
This commit is contained in:
parent
9656552878
commit
924d60e99b
3 changed files with 27 additions and 8 deletions
|
@ -25,5 +25,10 @@ AlignAfterOpenBracket: AlwaysBreak
|
|||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
ColumnLimit: 120
|
||||
|
||||
AllowShortBlocksOnASingleLine: 'false'
|
||||
AllowShortCaseLabelsOnASingleLine: 'false'
|
||||
AllowShortFunctionsOnASingleLine: 'Empty'
|
||||
AllowShortLambdasOnASingleLine: 'Empty'
|
||||
AllowShortLoopsOnASingleLine: 'false'
|
||||
SeparateDefinitionBlocks : 'Always'
|
||||
...
|
||||
|
|
|
@ -26,7 +26,9 @@ public:
|
|||
return AssetPtr<T>(AssetStore<T>::at(p).get(), reference_block);
|
||||
}
|
||||
|
||||
template<typename T> AssetPtr<T> get(const prism::path path) { return fetch<T>(path, get_reference_block(path)); }
|
||||
template<typename T> AssetPtr<T> get(const prism::path path) {
|
||||
return fetch<T>(path, get_reference_block(path));
|
||||
}
|
||||
|
||||
template<typename T> std::vector<T*> get_all() {
|
||||
std::vector<T*> assets;
|
||||
|
|
|
@ -15,7 +15,9 @@ public:
|
|||
template<class T> struct AssetPtr {
|
||||
AssetPtr() = default;
|
||||
|
||||
AssetPtr(T* ptr, ReferenceBlock* block) : handle(ptr), block(block) { block->references++; }
|
||||
AssetPtr(T* ptr, ReferenceBlock* block) : handle(ptr), block(block) {
|
||||
block->references++;
|
||||
}
|
||||
|
||||
AssetPtr(const AssetPtr& rhs) {
|
||||
handle = rhs.handle;
|
||||
|
@ -53,13 +55,23 @@ template<class T> struct AssetPtr {
|
|||
T* handle = nullptr;
|
||||
ReferenceBlock* block = nullptr;
|
||||
|
||||
explicit operator bool() const { return handle != nullptr; }
|
||||
explicit operator bool() const {
|
||||
return handle != nullptr;
|
||||
}
|
||||
|
||||
T* operator->() { return handle; }
|
||||
T* operator->() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
T* operator->() const { return handle; }
|
||||
T* operator->() const {
|
||||
return handle;
|
||||
}
|
||||
|
||||
T* operator*() { return handle; }
|
||||
T* operator*() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
T* operator*() const { return handle; }
|
||||
T* operator*() const {
|
||||
return handle;
|
||||
}
|
||||
};
|
||||
|
|
Reference in a new issue