Skip to content

Commit

Permalink
Ran clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Sep 18, 2024
1 parent 5c342c6 commit 1c97325
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion include/vsg/app/WindowAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace vsg
protected:
virtual ~WindowAdapter() {}

void _initSurface() override{};
void _initSurface() override {};
};
VSG_type_name(WindowAdapter);

Expand Down
2 changes: 1 addition & 1 deletion include/vsg/nodes/Compilable.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace vsg
Compilable(const Compilable& rhs, const CopyOp& copyop = {}) :
Inherit(rhs, copyop) {}

virtual void compile(Context& /*context*/){};
virtual void compile(Context& /*context*/) {};
};
VSG_type_name(vsg::Compilable);

Expand Down
2 changes: 1 addition & 1 deletion src/vsg/app/TransferTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ TransferTask::TransferResult TransferTask::_transferData(DataToCopy& dataToCopy)
auto& staging = frame.staging;
auto& commandBuffer = frame.transferCommandBuffer;

uint32_t newSemaphoreIndex = 0;//(dataToCopy.currentSemephoreCount) % 2;
uint32_t newSemaphoreIndex = 0; //(dataToCopy.currentSemephoreCount) % 2;
++dataToCopy.currentSemephoreCount;

auto& newSignalSemaphore = dataToCopy.transferCompleteSemaphore[newSemaphoreIndex];
Expand Down
10 changes: 5 additions & 5 deletions src/vsg/core/IntrusiveAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ IntrusiveAllocator::MemoryBlock::MemoryBlock(const std::string& in_name, size_t
// round blockSize up to nearest aligned size
blockSize = ((blockSize + alignment - 1) / alignment) * alignment;

memory = static_cast<Element*>(operator new (blockSize, std::align_val_t{blockAlignment}));
memory = static_cast<Element*>(operator new(blockSize, std::align_val_t{blockAlignment}));
memoryEnd = memory + blockSize / sizeof(Element);
capacity = static_cast<Element::Index>(blockSize / alignment);
firstSlot = static_cast<Element::Index>(((1 + elementAlignment) / elementAlignment) * elementAlignment - 1);
Expand Down Expand Up @@ -99,7 +99,7 @@ IntrusiveAllocator::MemoryBlock::MemoryBlock(const std::string& in_name, size_t

IntrusiveAllocator::MemoryBlock::~MemoryBlock()
{
operator delete (memory, std::align_val_t{blockAlignment});
operator delete(memory, std::align_val_t{blockAlignment});
}

bool IntrusiveAllocator::MemoryBlock::freeSlotsAvaible(size_t size) const
Expand Down Expand Up @@ -924,13 +924,13 @@ void* IntrusiveAllocator::allocate(std::size_t size, AllocatorAffinity allocator
//std::cout<<"IntrusiveAllocator::allocate() Failed to allocator memory from memoryBlocks "<<blocks.get()<<std::endl;
}

ptr = operator new (size, std::align_val_t{blocks->alignment});
ptr = operator new(size, std::align_val_t{blocks->alignment});
if (ptr) largeAllocations[ptr] = std::pair<size_t, size_t>(blocks->alignment, size);
//std::cout<<"IntrusiveAllocator::allocate() MemoryBlocks aligned large allocation = "<<ptr<<" with size = "<<size<<", alignment = "<<blocks->alignment<<" blocks->maximumAllocationSize = "<<blocks->maximumAllocationSize<<std::endl;
return ptr;
}

ptr = operator new (size, std::align_val_t{defaultAlignment});
ptr = operator new(size, std::align_val_t{defaultAlignment});
if (ptr) largeAllocations[ptr] = std::pair<size_t, size_t>(defaultAlignment, size);
//std::cout<<"IntrusiveAllocator::allocate() default aligned large allocation = "<<ptr<<" with size = "<<size<<", alignment = "<<defaultAlignment<<std::endl;
return ptr;
Expand Down Expand Up @@ -977,7 +977,7 @@ bool IntrusiveAllocator::deallocate(void* ptr, std::size_t size)
{
// large allocation;
// std::cout<<"IntrusiveAllocator::deallocate("<<ptr<<") deleting large allocation."<<std::endl;
operator delete (ptr, std::align_val_t{la_itr->second.first});
operator delete(ptr, std::align_val_t{la_itr->second.first});
largeAllocations.erase(la_itr);
return true;
}
Expand Down
18 changes: 9 additions & 9 deletions src/vsg/utils/Builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ ref_ptr<Node> Builder::createCapsule(const GeometryInfo& info, const StateInfo&
{
unsigned int vi = c * 2;
float r = float(c) / float(num_columns - 1);
float alpha = (r)*2.0f * PIf;
float alpha = (r) * 2.0f * PIf;
v = dx * (-sinf(alpha)) + dy * (cosf(alpha));
n = normalize(v);

Expand Down Expand Up @@ -690,7 +690,7 @@ ref_ptr<Node> Builder::createCone(const GeometryInfo& info, const StateInfo& sta
{
unsigned int vi = 1 + c;
float r = float(c) / float(num_columns);
alpha = (r)*2.0f * PIf;
alpha = (r) * 2.0f * PIf;
v = edge(alpha);
n = normal(alpha);

Expand Down Expand Up @@ -750,7 +750,7 @@ ref_ptr<Node> Builder::createCone(const GeometryInfo& info, const StateInfo& sta
{
unsigned int vi = c * 2;
float r = float(c) / float(num_columns - 1);
alpha = (r)*2.0f * PIf;
alpha = (r) * 2.0f * PIf;
v = edge(alpha);
n = normal(alpha);

Expand Down Expand Up @@ -790,7 +790,7 @@ ref_ptr<Node> Builder::createCone(const GeometryInfo& info, const StateInfo& sta
for (unsigned int c = 1; c < num_columns - 1; ++c)
{
float r = float(c) / float(num_columns - 1);
alpha = (r)*2.0f * PIf;
alpha = (r) * 2.0f * PIf;
v = edge(alpha);

unsigned int vi = bottom_i + c;
Expand Down Expand Up @@ -883,7 +883,7 @@ ref_ptr<Node> Builder::createCylinder(const GeometryInfo& info, const StateInfo&
{
unsigned int vi = c * 2;
float r = float(c) / float(num_columns - 1);
float alpha = (r)*2.0f * PIf;
float alpha = (r) * 2.0f * PIf;
v = dx * (-sinf(alpha)) + dy * (cosf(alpha));
n = normalize(v);

Expand Down Expand Up @@ -963,7 +963,7 @@ ref_ptr<Node> Builder::createCylinder(const GeometryInfo& info, const StateInfo&
{
unsigned int vi = c * 2;
float r = float(c) / float(num_columns - 1);
float alpha = (r)*2.0f * PIf;
float alpha = (r) * 2.0f * PIf;
v = dx * (-sinf(alpha)) + dy * (cosf(alpha));
n = normalize(v);

Expand Down Expand Up @@ -1017,7 +1017,7 @@ ref_ptr<Node> Builder::createCylinder(const GeometryInfo& info, const StateInfo&
for (unsigned int c = 1; c < num_columns - 1; ++c)
{
float r = float(c) / float(num_columns - 1);
float alpha = (r)*2.0f * PIf;
float alpha = (r) * 2.0f * PIf;
v = dx * (-sinf(alpha)) + dy * (cosf(alpha));
n = normalize(v);

Expand Down Expand Up @@ -1106,7 +1106,7 @@ ref_ptr<Node> Builder::createDisk(const GeometryInfo& info, const StateInfo& sta
for (unsigned int c = 1; c < num_vertices; ++c)
{
float r = float(c) / float(num_vertices - 1);
float alpha = (r)*2.0f * PIf;
float alpha = (r) * 2.0f * PIf;
float sn = sinf(alpha);
float cs = cosf(alpha);
vec3 v = dy * cs - dx * sn;
Expand All @@ -1117,7 +1117,7 @@ ref_ptr<Node> Builder::createDisk(const GeometryInfo& info, const StateInfo& sta

if (stateInfo.wireframe)
{
unsigned int num_indices = (num_vertices)*2;
unsigned int num_indices = (num_vertices) * 2;
indices = ushortArray::create(num_indices);

unsigned int i = 0;
Expand Down

0 comments on commit 1c97325

Please sign in to comment.