Skip to content

Commit e8e1e10

Browse files
committed
Ran clang-format
1 parent f45b645 commit e8e1e10

3 files changed

Lines changed: 44 additions & 24 deletions

File tree

include/vsg/io/stream.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
2929

3030
#include <istream>
3131
#include <ostream>
32-
#include <sstream>
3332
#include <set>
33+
#include <sstream>
3434

3535
namespace vsg
3636
{
@@ -344,10 +344,12 @@ namespace vsg
344344
output << "{ ";
345345

346346
bool first = true;
347-
for(auto& value : values)
347+
for (auto& value : values)
348348
{
349-
if (!first) output << ", ";
350-
else first = false;
349+
if (!first)
350+
output << ", ";
351+
else
352+
first = false;
351353

352354
output << value;
353355
}
@@ -357,5 +359,4 @@ namespace vsg
357359
return output;
358360
}
359361

360-
361362
} // namespace vsg

src/vsg/app/CompileManager.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,16 @@ CompileResult CompileManager::compile(ref_ptr<Object> object, ContextSelectionFu
227227
result.containsPagedLOD = requirements.containsPagedLOD;
228228
result.views = requirements.views;
229229
result.dynamicData = requirements.dynamicData;
230+
result.message = "Nothing assigned yet.";
230231

231232
auto compileTraversal = compileTraversals->take_when_available();
232233

233234
// if no CompileTraversals are available abort compile
234-
if (!compileTraversal) return result;
235+
if (!compileTraversal)
236+
{
237+
info("Unable to aquire compileTraversal.");
238+
return result;
239+
}
235240

236241
auto run_compile_traversal = [&]() -> void {
237242
try

src/vsg/utils/GraphicsPipelineConfigurator.cpp

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,7 @@ int GraphicsPipelineConfigurator::compare(const Object& rhs_object) const
544544
// The compare_shaderHints, IteratorPair and Iterator structs all exist in service of this mutliset comparison.
545545
//
546546

547-
auto compare_shaderHints = [](const ref_ptr<ShaderCompileSettings>& lsh, const ref_ptr<ShaderCompileSettings>& rsh) -> int
548-
{
547+
auto compare_shaderHints = [](const ref_ptr<ShaderCompileSettings>& lsh, const ref_ptr<ShaderCompileSettings>& rsh) -> int {
549548
if (lsh == rsh) return 0;
550549
return lsh ? (rsh ? lsh->compare_except_defines(*rsh) : 1) : (rsh ? -1 : 0);
551550
};
@@ -558,7 +557,8 @@ int GraphicsPipelineConfigurator::compare(const Object& rhs_object) const
558557
iterator itr;
559558
iterator end;
560559

561-
explicit IteratorPair(const std::set<std::string>& values) : itr(values.begin()), end(values.end()) {}
560+
explicit IteratorPair(const std::set<std::string>& values) :
561+
itr(values.begin()), end(values.end()) {}
562562

563563
bool valid() const { return itr != end; }
564564
};
@@ -568,7 +568,8 @@ int GraphicsPipelineConfigurator::compare(const Object& rhs_object) const
568568
IteratorPair lhs;
569569
IteratorPair rhs;
570570

571-
explicit Iterator(IteratorPair in_lhs, IteratorPair in_rhs) : lhs(in_lhs), rhs(in_rhs) {}
571+
explicit Iterator(IteratorPair in_lhs, IteratorPair in_rhs) :
572+
lhs(in_lhs), rhs(in_rhs) {}
572573

573574
bool valid() const { return lhs.valid() || rhs.valid(); }
574575

@@ -579,13 +580,17 @@ int GraphicsPipelineConfigurator::compare(const Object& rhs_object) const
579580
{
580581
if (rhs.valid())
581582
{
582-
if (*lhs.itr < *rhs.itr) return *lhs.itr;
583-
else if (*rhs.itr < *lhs.itr ) return *rhs.itr;
583+
if (*lhs.itr < *rhs.itr)
584+
return *lhs.itr;
585+
else if (*rhs.itr < *lhs.itr)
586+
return *rhs.itr;
584587
else { return *rhs.itr; }
585588
}
586-
else return *lhs.itr;
589+
else
590+
return *lhs.itr;
587591
}
588-
else return *rhs.itr;
592+
else
593+
return *rhs.itr;
589594
}
590595

591596
bool advance()
@@ -594,26 +599,35 @@ int GraphicsPipelineConfigurator::compare(const Object& rhs_object) const
594599
{
595600
if (rhs.valid())
596601
{
597-
if (*lhs.itr < *rhs.itr) lhs.itr++;
598-
else if (*rhs.itr < *lhs.itr) rhs.itr++;
599-
else { ++lhs.itr; ++rhs.itr; }
602+
if (*lhs.itr < *rhs.itr)
603+
lhs.itr++;
604+
else if (*rhs.itr < *lhs.itr)
605+
rhs.itr++;
606+
else
607+
{
608+
++lhs.itr;
609+
++rhs.itr;
610+
}
600611
}
601-
else lhs.itr++;
612+
else
613+
lhs.itr++;
602614
}
603-
else if (rhs.valid()) rhs.itr++;
615+
else if (rhs.valid())
616+
rhs.itr++;
604617

605618
return valid();
606619
}
607620
};
608621

609-
auto local_compare = [](Iterator ilhs, Iterator irhs) -> int
610-
{
611-
while(ilhs.valid() && irhs.valid())
622+
auto local_compare = [](Iterator ilhs, Iterator irhs) -> int {
623+
while (ilhs.valid() && irhs.valid())
612624
{
613625
const auto& lhs_value = ilhs.value();
614626
const auto& rhs_value = irhs.value();
615-
if (lhs_value < rhs_value) return -1;
616-
else if (lhs_value > rhs_value) return 1;
627+
if (lhs_value < rhs_value)
628+
return -1;
629+
else if (lhs_value > rhs_value)
630+
return 1;
617631

618632
ilhs.advance();
619633
irhs.advance();

0 commit comments

Comments
 (0)