Skip to content

Commit cf4e7c1

Browse files
committed
format code
1 parent c8b88c3 commit cf4e7c1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

source/slang/slang-ir.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,8 @@ struct IRInst
597597
template<typename T>
598598
T* getNextChildOfType(IRInst* child = nullptr)
599599
{
600-
for (IRInst* cc = child ? child->getNextInst() : getFirstDecorationOrChild(); cc != nullptr; cc = cc->getNextInst())
600+
for (IRInst* cc = child ? child->getNextInst() : getFirstDecorationOrChild(); cc != nullptr;
601+
cc = cc->getNextInst())
601602
{
602603
if (T* cct = as<T>(cc))
603604
return cct;
@@ -792,10 +793,11 @@ struct IRInst
792793
void removeOperand(Index index);
793794

794795
/// Transfer any decorations of this instruction to the `target` instruction.
795-
// TODO: rewrite as transferDecorationsTo(target) -> transferChildrenOfTypeTo<IRDecoration>(target)
796+
// TODO: rewrite as transferDecorationsTo(target) ->
797+
// transferChildrenOfTypeTo<IRDecoration>(target)
796798
void transferDecorationsTo(IRInst* target);
797799

798-
template <typename T>
800+
template<typename T>
799801
void transferChildrenOfTypeTo(IRInst* target)
800802
{
801803
for (T* cc = getNextChildOfType<T>(); cc != nullptr; cc = getNextChildOfType<T>(cc))

source/slang/slang-legalize-types.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,11 @@ struct TupleTypeBuilder
488488

489489
// TODO: shallow clone of modifiers, etc.
490490
IRStructField* originalField = findStructField(originalStructType, ee.fieldKey);
491-
IRStructField* newField = builder->createStructField(ordinaryStructType, ee.fieldKey, fieldType);
491+
IRStructField* newField =
492+
builder->createStructField(ordinaryStructType, ee.fieldKey, fieldType);
492493
// In case the original struct had offsets calculated, transfer those as well.
493-
// The original offsets should still be valid, since we only skip fields of types that aren't representable in memory.
494+
// The original offsets should still be valid, since we only skip fields of types
495+
// that aren't representable in memory.
494496
originalField->transferChildrenOfTypeTo<IROffsetDecoration>(newField);
495497
}
496498

0 commit comments

Comments
 (0)