make methods static

This commit is contained in:
ohyzha
2024-12-19 16:50:59 +02:00
parent 4e4097d23e
commit 02f158a929
2 changed files with 6 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ namespace OpenVulkano
return GetResource(resourceName.c_str(), GetWinApiResourceType(resType));
}
LPSTR EmbeddedResourceLoaderWindows::GetWinApiResourceType(std::string resourceType) const
LPSTR EmbeddedResourceLoaderWindows::GetWinApiResourceType(std::string resourceType)
{
std::transform(resourceType.begin(), resourceType.end(), resourceType.begin(),
[](char c) { return std::tolower(c); });
@@ -50,7 +50,7 @@ namespace OpenVulkano
return RT_RCDATA;
}
std::string EmbeddedResourceLoaderWindows::GetResourceName(const char* resId) const
std::string EmbeddedResourceLoaderWindows::GetResourceName(const char* resId)
{
// check if resId was provided as interger and not CString
// https://stackoverflow.com/questions/3610565/why-does-makeintresource-work

View File

@@ -16,10 +16,10 @@ namespace OpenVulkano
public:
std::string GetResourcePath(const std::string& resourceName) override;
Array<char> GetResource(const std::string& resourceName) override;
Array<char> GetResource(const char* resId, char* resourceType);
Array<char> GetResource(uint16_t id, char* resourceType);
static Array<char> GetResource(const char* resId, char* resourceType);
static Array<char> GetResource(uint16_t id, char* resourceType);
private:
char* GetWinApiResourceType(std::string resourceType) const;
std::string GetResourceName(const char* resId) const;
static char* GetWinApiResourceType(std::string resourceType);
static std::string GetResourceName(const char* resId);
};
}