Skip to content

Commit

Permalink
do not use <format>
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV committed Jul 11, 2024
1 parent d16c1ce commit 7ce5a4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/sgl/device/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include "sgl/core/config.h"
#include "sgl/core/macros.h"
#include "sgl/core/format.h"

#include <string>
#include <format>

#if SGL_HAS_D3D12
#include <dxgidebug.h>
Expand Down Expand Up @@ -50,7 +50,7 @@ std::string get_last_gfx_layer_error()
// used by SLANG_CALL.
std::string build_slang_failed_message(const char* call, SlangResult result)
{
auto msg = std::format("Slang call {} failed with error: {}\n", call, result);
auto msg = fmt::format("Slang call {} failed with error: {}\n", call, result);
if (static_cast<uint32_t>(result) >= 0x80000000U) {
std::string gfx_error = get_last_gfx_layer_error();
if (!gfx_error.empty()) {
Expand Down
1 change: 0 additions & 1 deletion src/sgl/device/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "sgl/core/error.h"

#include <slang-gfx.h>
#include <format>


namespace sgl {
Expand Down
6 changes: 3 additions & 3 deletions src/sgl/device/tests/test_hot_reload.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: Apache-2.0

#include "testing.h"
#include "sgl/core/format.h"
#include "sgl/device/device.h"
#include "sgl/device/shader.h"
#include "sgl/device/kernel.h"
#include "sgl/device/hot_reload.h"
#include <fstream>
#include <filesystem>
#include <format>
#include <thread>
#include <chrono>

Expand All @@ -28,7 +28,7 @@ static void write_shader(const WriteShaderDesc& desc)
imports += "import " + i + ";\n";
}

std::string formatted = std::format(
std::string formatted = fmt::format(
R"SHADER(
{3}
RWStructuredBuffer<uint> {0};
Expand Down Expand Up @@ -65,7 +65,7 @@ static void write_module(const WriteModuleDesc& desc)
imports += "import " + i + ";\n";
}

std::string formatted = std::format(
std::string formatted = fmt::format(
R"SHADER(
{0}
int {1}()
Expand Down

0 comments on commit 7ce5a4a

Please sign in to comment.