consexpr deletion from string

This commit is contained in:
Metehan Tuncbilek
2024-10-20 14:02:40 +03:00
parent 9fa25d6922
commit b047a7c6c3
2 changed files with 7 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ windows_x64, ubuntu-24.04, mac_arm ] os: [ windows_x64, ubuntu-latest, mac_arm ]
steps: steps:
- name: Checkout - name: Checkout
@@ -24,13 +24,13 @@ jobs:
with: with:
submodules: true submodules: true
- name: Install Vulkan SDK - name: Install Vulkan SDK
if: matrix.os == 'ubuntu-24.04' if: matrix.os == 'ubuntu-latest'
uses: humbletim/install-vulkan-sdk@v1.1.1 uses: humbletim/install-vulkan-sdk@v1.1.1
with: with:
version: 1.3.250.1 version: 1.3.250.1
cache: true cache: true
- name: Install Dev Packages - name: Install Dev Packages
if: matrix.os == 'ubuntu-24.04' if: matrix.os == 'ubuntu-latest'
run: > run: >
sudo apt update && sudo apt install -y extra-cmake-modules libwayland-dev libxkbcommon-dev xorg-dev libarchive-dev libassimp-dev ninja-build glslang-tools glslang-dev unzip zip libcurl4-openssl-dev libfreetype-dev libjpeg-turbo8-dev nasm sudo apt update && sudo apt install -y extra-cmake-modules libwayland-dev libxkbcommon-dev xorg-dev libarchive-dev libassimp-dev ninja-build glslang-tools glslang-dev unzip zip libcurl4-openssl-dev libfreetype-dev libjpeg-turbo8-dev nasm
&& sudo wget https://sourceforge.net/projects/bin2c/files/1.1/bin2c-1.1.zip && sudo unzip bin2c-1.1.zip && cd bin2c && sudo gcc -o bin2c bin2c.c && sudo mv bin2c /usr/bin && sudo wget https://sourceforge.net/projects/bin2c/files/1.1/bin2c-1.1.zip && sudo unzip bin2c-1.1.zip && cd bin2c && sudo gcc -o bin2c bin2c.c && sudo mv bin2c /usr/bin

View File

@@ -203,7 +203,7 @@ namespace OpenVulkano
m_string.size() - end - delimiter.size()) }; m_string.size() - end - delimiter.size()) };
} }
static inline constexpr int64_t OctToInt(const std::string_view& string) static inline int64_t OctToInt(const std::string_view& string)
{ {
int64_t result = 0; int64_t result = 0;
for (int i = 0; i < static_cast<int>(string.length()); i++) for (int i = 0; i < static_cast<int>(string.length()); i++)
@@ -226,9 +226,9 @@ namespace OpenVulkano
return result; return result;
} }
constexpr int64_t OctToInt() const { return OctToInt(m_string); } int64_t OctToInt() const { return OctToInt(m_string); }
static inline constexpr int64_t HexToInt(const std::string_view& string) static inline int64_t HexToInt(const std::string_view& string)
{ {
int64_t result = 0; int64_t result = 0;
for (char c: string) for (char c: string)
@@ -261,7 +261,7 @@ namespace OpenVulkano
return result; return result;
} }
constexpr int64_t HexToInt() { return HexToInt(m_string); } int64_t HexToInt() { return HexToInt(m_string); }
static bool IsUrl(const std::string_view& str) static bool IsUrl(const std::string_view& str)
{ {