Fix: Usage of `format_to` in `fmt`.

Should not be using versions.
`v11::format_to` -> `fmt::format_to`.
This commit is contained in:
Anish Bhobe 2025-05-13 12:46:58 +02:00
parent adfa86ebe9
commit cc4cffe989
5 changed files with 14 additions and 51 deletions

View File

@ -247,7 +247,7 @@ struct fmt::formatter<eastl::fixed_string<TType, TCount, TOverflow>> : nested_fo
// ReSharper disable once CppInconsistentNaming
format(const eastl::fixed_string<TType, TCount, TOverflow> &str, format_context &ctx) const
{
return write_padded(ctx, [this, str](auto out) { return v11::format_to(out, "{}", nested(str.c_str())); });
return write_padded(ctx, [this, str](auto out) { return fmt::format_to(out, "{}", nested(str.c_str())); });
}
};

View File

@ -56,18 +56,18 @@ struct fmt::formatter<MemorySize>
// return format_to(ctx.out(), "({}, {})", foo.a, foo.b); // --== KEY LINE ==--
if (mem.m_Gigabytes > 0)
{
return v11::format_to(ctx.out(), "{}.{} GB", mem.m_Gigabytes, static_cast<u16>(mem.m_Megabytes / 1024.0));
return fmt::format_to(ctx.out(), "{}.{} GB", mem.m_Gigabytes, static_cast<u16>(mem.m_Megabytes / 1024.0));
}
if (mem.m_Megabytes > 0)
{
return v11::format_to(ctx.out(), "{}.{} MB", mem.m_Megabytes, static_cast<u16>(mem.m_Kilobytes / 1024.0));
return fmt::format_to(ctx.out(), "{}.{} MB", mem.m_Megabytes, static_cast<u16>(mem.m_Kilobytes / 1024.0));
}
if (mem.m_Kilobytes > 0)
{
return v11::format_to(ctx.out(), "{}.{} KB", mem.m_Kilobytes, static_cast<u16>(mem.m_Bytes / 1024.0));
return fmt::format_to(ctx.out(), "{}.{} KB", mem.m_Kilobytes, static_cast<u16>(mem.m_Bytes / 1024.0));
}
return v11::format_to(ctx.out(), "{} Bytes", mem.m_Bytes);
return fmt::format_to(ctx.out(), "{} Bytes", mem.m_Bytes);
}
};

View File

@ -20,16 +20,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1738734093,
"narHash": "sha256-UEYOKfXXKU49fR7dGB05As0s2pGbLK4xDo48Qtdm7xs=",
"owner": "NixOS",
"lastModified": 1742976680,
"narHash": "sha256-Lcyi6YyR0PgN5rOrmM6mM/1MJIYhGi6rrq0+eiqvUb4=",
"owner": "kidrigger",
"repo": "nixpkgs",
"rev": "5b2753b0356d1c951d7a3ef1d086ba5a71fff43c",
"rev": "51cf54bdbd9c1a0a2f833cced82451df0d9c25bd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"owner": "kidrigger",
"ref": "imgui-docking",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:kidrigger/nixpkgs/imgui-docking";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {self, nixpkgs, flake-utils }:
@ -26,7 +26,7 @@
ccls
clang-tools
lldb
(imgui.override {IMGUI_BUILD_VULKAN_BINDING = true; IMGUI_BUILD_GLFW_BINDING=true; })
(imgui.override {IMGUI_BUILD_VULKAN_BINDING = true; IMGUI_BUILD_GLFW_BINDING=true; IMGUI_EXPERIMENTAL_DOCKING = true; })
];
buildInputs = [
@ -50,6 +50,7 @@
directx-shader-compiler
glslang
shaderc
shader-slang
];
};
}

View File

@ -1,38 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
let eabase = pkgs.callPackage ./vendored-nix/eabase {}; in
let eastl = pkgs.callPackage ./vendored-nix/eastl { inherit eabase; }; in
let tinygltf = pkgs.callPackage ./vendored-nix/tinygltf {}; in
let debugbreak = pkgs.callPackage ./vendored-nix/scottt-debugbreak {}; in
pkgs.clangStdenv.mkDerivation {
name = "aster-env";
nativeBuildInputs = with pkgs; [
cmake
ninja
(imgui.override {IMGUI_BUILD_VULKAN_BINDING = true; IMGUI_BUILD_GLFW_BINDING=true; })
];
buildInputs = with pkgs; [
glm
glfw3
eastl
fmt
eabase
eastl
entt
tinygltf
debugbreak
stb
# vulkan
vulkan-headers
vulkan-loader
vulkan-validation-layers
vulkan-memory-allocator
directx-shader-compiler
glslang
shaderc
];
}