Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eac3c7d24a69
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fb2950aabf71
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 12, 2021

  1. fix indentation warnings

    xzcvczx committed May 12, 2021
    Copy the full SHA
    75848b1 View commit details
  2. Merge pull request #476 from xzcvczx/indent-fix

    fix indentation warnings
    azonenberg authored May 12, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fb2950a View commit details
Showing with 10 additions and 10 deletions.
  1. +10 −10 scopehal/AlignedAllocator.h
20 changes: 10 additions & 10 deletions scopehal/AlignedAllocator.h
Original file line number Diff line number Diff line change
@@ -116,11 +116,11 @@ class AlignedAllocator
throw std::length_error("AlignedAllocator<T>::allocate(): requested size is too large, integer overflow?");

//Do the actual allocation
#ifdef _WIN32
T* ret = static_cast<T*>(_aligned_malloc(n*sizeof(T), alignment));
#else
T* ret = static_cast<T*>(aligned_alloc(alignment, n*sizeof(T)));
#endif
#ifdef _WIN32
T* ret = static_cast<T*>(_aligned_malloc(n*sizeof(T), alignment));
#else
T* ret = static_cast<T*>(aligned_alloc(alignment, n*sizeof(T)));
#endif

//Error check
if(ret == NULL)
@@ -131,11 +131,11 @@ class AlignedAllocator

void deallocate(T* const p, const size_t /*unused*/) const
{
#ifdef _WIN32
_aligned_free(p);
#else
free(p);
#endif
#ifdef _WIN32
_aligned_free(p);
#else
free(p);
#endif
}

//convenience wrapper