Perpairing for refractor to make everything work more as a library
This commit is contained in:
@@ -14,7 +14,7 @@ struct Sys {
|
||||
class System {
|
||||
public:
|
||||
System();
|
||||
Sys* getSystemSpec();
|
||||
Sys getSystemSpec();
|
||||
virtual ~System();
|
||||
private:
|
||||
Sys* m_Sys;
|
||||
|
||||
@@ -14,8 +14,10 @@ System::System() {
|
||||
|
||||
}
|
||||
|
||||
Sys* System::getSystemSpec() {
|
||||
return m_Sys;
|
||||
Sys System::getSystemSpec() {
|
||||
Sys temp;
|
||||
memcpy(&temp, m_Sys, sizeof(Sys));
|
||||
return temp;
|
||||
}
|
||||
|
||||
System::~System() {
|
||||
|
||||
@@ -14,7 +14,7 @@ int main(int argc, char** argv) {
|
||||
sleep(1);
|
||||
|
||||
std::cout << std::endl;
|
||||
Sys* sys = System_Instance->getSystemSpec();
|
||||
Sys sys = System_Instance->getSystemSpec();
|
||||
|
||||
while(1) {
|
||||
sleep(1);
|
||||
|
||||
Reference in New Issue
Block a user