Skip to content

Commit

Permalink
try format
Browse files Browse the repository at this point in the history
  • Loading branch information
pkdawson committed Apr 20, 2024
1 parent 514bd5b commit da09a9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/gdext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,12 @@ jobs:
- name: Build debug
run: |
export PATH="$(brew --prefix llvm@15)/bin:$PATH"
echo $PATH
export CC=$(which clang)
export CXX=$(which clang++)
env
clang++ --version
cd gdext
scons
- name: Build release
run: |
export PATH="$(brew --prefix llvm@15)/bin:$PATH"
echo $PATH
cd gdext
scons target=template_release
Expand Down
6 changes: 0 additions & 6 deletions gdext/scripts/vcpkg-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ $VCPKG_ROOT/vcpkg install --triplet x64-osx
mv vcpkg_installed $vcpkg_x64
$VCPKG_ROOT/vcpkg install --triplet arm64-osx

echo "zzzzzzzzzzzzzzzzzzzzzz"
cat /Users/runner/work/imgui-godot/imgui-godot/vcpkg/buildtrees/detect_compiler/config-arm64-osx-rel-CMakeCache.txt.log
cat /Users/runner/work/imgui-godot/imgui-godot/vcpkg/buildtrees/detect_compiler/config-arm64-osx-rel-out.log
cat /Users/runner/work/imgui-godot/imgui-godot/vcpkg/buildtrees/detect_compiler/config-arm64-osx-rel-err.log
echo "zzzzzzzzzzzzzzzzzzzzzz"

for libpath in "lib" "debug/lib"
do
pushd vcpkg_installed/arm64-osx/$libpath
Expand Down
4 changes: 3 additions & 1 deletion gdext/src/Fonts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <imgui.h>

#include <filesystem>
#include <format>
#include <vector>

using namespace godot;
Expand Down Expand Up @@ -97,7 +98,8 @@ void Fonts::Impl::AddFontToAtlas(const Ref<FontFile>& font, int fontSize, bool m
fs::path fontpath = (font->get_path().utf8().get_data());

// no std::format in Clang 14
std::string fontdesc = fontpath.filename().string() + ", "s + std::to_string(fontSize) + "px";
std::string fontdesc = std::format("{}, {}px", fontpath.filename().string(), fontSize);
// std::string fontdesc = fontpath.filename().string() + ", "s + std::to_string(fontSize) + "px";
if (fontdesc.length() > 39)
fontdesc.resize(39);
std::copy(fontdesc.begin(), fontdesc.end(), fc.Name);
Expand Down

0 comments on commit da09a9e

Please sign in to comment.