Perpairing for refractor to make everything work more as a library

This commit is contained in:
Ben
2018-12-18 17:37:37 +00:00
parent 9afe3d7437
commit fa0b075722
3 changed files with 6 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ struct Sys {
class System { class System {
public: public:
System(); System();
Sys* getSystemSpec(); Sys getSystemSpec();
virtual ~System(); virtual ~System();
private: private:
Sys* m_Sys; Sys* m_Sys;

View File

@@ -14,8 +14,10 @@ System::System() {
} }
Sys* System::getSystemSpec() { Sys System::getSystemSpec() {
return m_Sys; Sys temp;
memcpy(&temp, m_Sys, sizeof(Sys));
return temp;
} }
System::~System() { System::~System() {

View File

@@ -14,7 +14,7 @@ int main(int argc, char** argv) {
sleep(1); sleep(1);
std::cout << std::endl; std::cout << std::endl;
Sys* sys = System_Instance->getSystemSpec(); Sys sys = System_Instance->getSystemSpec();
while(1) { while(1) {
sleep(1); sleep(1);