1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

#include "fsCSystem.h"

#include <unordered_set>

#if defined fsANDROID
    #include "impl/scapix/android/fsCSystem.h"
#else
    #include "impl/scapix/fsCSystem.h"
#endif

fsCPlatformSystem*  fsCPlatformSystem::mInstance;

fsBool fsCPlatformSystem::isFireTV() const {<--- The member function 'fsCPlatformSystem::isFireTV' can be static.
    static const std::unordered_set<std::string> amazonFireDevices = {
            "AFTMM",        // Fire stick
            "AFTGAZL",      // Fire cube
    };

    const std::string systemName = mInstance->getSystemName(); // Convert to std::string for safer comparison
    return amazonFireDevices.find(systemName) != amazonFireDevices.end();
}


std::string fsCPlatformSystem::getSystemName()<--- The member function 'fsCPlatformSystem::getSystemName' can be static.
{
    return SystemImpl::systemNameGet();
}

fsCPlatformSystem* const fsCPlatformSystem::getInstance()
{
    return mInstance;
}

void fsCPlatformSystem::create()
{
    mInstance = new fsCPlatformSystem();
}

void fsCPlatformSystem::destroy()
{
    delete mInstance;
}

fsCPlatformSystem::fsCPlatformSystem()
{
}

fsCPlatformSystem::~fsCPlatformSystem()
{
}