Move Swap(T&, T&) to J3ML.h

This commit is contained in:
2024-05-24 14:36:24 -04:00
parent e0464b7f4f
commit bf237d1428
2 changed files with 10 additions and 10 deletions

View File

@@ -7,14 +7,7 @@
namespace J3ML::Geometry
{
// TODO: Move to separate math lib, find duplicates!
template <typename T>
void Swap(T &a, T &b)
{
T temp = std::move(a);
a = std::move(b);
b = std::move(temp);
}
/// A 3D cylinder with spherical ends.
class Capsule : public Shape

View File

@@ -1,7 +1,5 @@
#pragma once
//
// Created by josh on 12/25/2023.
//
@@ -10,6 +8,15 @@
#include <string>
#include <cassert>
// TODO: Move to separate math lib, find duplicates!
template <typename T>
void Swap(T &a, T &b)
{
T temp = std::move(a);
a = std::move(b);
b = std::move(temp);
}
namespace J3ML::SizedIntegralTypes
{
using u8 = uint8_t;