Test
This commit is contained in:
parent
4a4116da45
commit
174ae36894
22
.gitea/workflows/demo.yaml
Normal file
22
.gitea/workflows/demo.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Raspberry Pi 4 Build
|
||||||
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Explore-Gitea-Actions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||||
|
- run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
|
- run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||||
|
- run: echo "The workflow is now ready to test your code on the runner."
|
||||||
|
- name: List files in the repository
|
||||||
|
run: |
|
||||||
|
ls ${{ gitea.workspace }}
|
||||||
|
- run: echo "This job's status is ${{ job.status }}."
|
@ -8,9 +8,12 @@
|
|||||||
|
|
||||||
namespace ehs
|
namespace ehs
|
||||||
{
|
{
|
||||||
|
typedef bool (*GcLogic)(BaseObj*);
|
||||||
|
|
||||||
class GarbageCollector
|
class GarbageCollector
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
static Vector<GcLogic>* logic;
|
||||||
static Vector<BaseObj*> garbage;
|
static Vector<BaseObj*> garbage;
|
||||||
static UInt_64 max;
|
static UInt_64 max;
|
||||||
static Thread thread;
|
static Thread thread;
|
||||||
|
@ -19,13 +19,13 @@ namespace ehs
|
|||||||
|
|
||||||
explicit Type(const Char_8* id);
|
explicit Type(const Char_8* id);
|
||||||
|
|
||||||
Type(Type&& type) noexcept = default;
|
Type(Type&& type) noexcept;
|
||||||
|
|
||||||
Type(const Type& type) = default;
|
Type(const Type& type);
|
||||||
|
|
||||||
Type& operator=(Type&& type) noexcept = default;
|
Type& operator=(Type&& type) noexcept;
|
||||||
|
|
||||||
Type& operator=(const Type& type) = default;
|
Type& operator=(const Type& type);
|
||||||
|
|
||||||
bool operator==(const Type& type) const;
|
bool operator==(const Type& type) const;
|
||||||
|
|
||||||
|
@ -142,10 +142,10 @@ namespace ehs
|
|||||||
|
|
||||||
Type* result = new Type[hierarchySize + 1];
|
Type* result = new Type[hierarchySize + 1];
|
||||||
|
|
||||||
result[0] = newType;
|
result[0] = (Type&&)newType;
|
||||||
|
|
||||||
for (UInt_64 i = 1; i < hierarchySize; i++)
|
for (UInt_64 i = 0; i < hierarchySize; i++)
|
||||||
result[i] = hierarchy[i];
|
result[i + 1] = (Type&&)hierarchy[i];
|
||||||
|
|
||||||
hierarchySize++;
|
hierarchySize++;
|
||||||
delete[] hierarchy;
|
delete[] hierarchy;
|
||||||
|
41
src/Type.cpp
41
src/Type.cpp
@ -12,6 +12,47 @@ namespace ehs
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type::Type(Type&& type) noexcept
|
||||||
|
: size(type.size), id(type.id), hashId(type.hashId)
|
||||||
|
{
|
||||||
|
type.size = 0;
|
||||||
|
type.id = nullptr;
|
||||||
|
type.hashId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Type::Type(const Type& type)
|
||||||
|
: size(type.size), id(type.id), hashId(type.hashId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Type& Type::operator=(Type&& type) noexcept
|
||||||
|
{
|
||||||
|
if (this == &type)
|
||||||
|
return *this;
|
||||||
|
|
||||||
|
size = type.size;
|
||||||
|
id = type.id;
|
||||||
|
hashId = type.hashId;
|
||||||
|
|
||||||
|
type.size = 0;
|
||||||
|
type.id = nullptr;
|
||||||
|
type.hashId = 0;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Type& Type::operator=(const Type& type)
|
||||||
|
{
|
||||||
|
if (this == &type)
|
||||||
|
return *this;
|
||||||
|
|
||||||
|
size = type.size;
|
||||||
|
id = type.id;
|
||||||
|
hashId = type.hashId;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
bool Type::operator==(const Type& type) const
|
bool Type::operator==(const Type& type) const
|
||||||
{
|
{
|
||||||
return hashId == type.hashId;
|
return hashId == type.hashId;
|
||||||
|
Loading…
Reference in New Issue
Block a user