Skip to content

Commit

Permalink
chore: reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Dec 31, 2024
1 parent f302be6 commit bd6371e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 20 deletions.
2 changes: 1 addition & 1 deletion include/zenkit/Archive.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// SPDX-License-Identifier: MIT
#pragma once
#include "zenkit/Boxes.hh"
#include "zenkit/Error.hh"
#include "zenkit/Library.hh"
#include "zenkit/Object.hh"
#include "zenkit/Stream.hh"
#include "zenkit/Error.hh"

#include <memory>
#include <string>
Expand Down
38 changes: 26 additions & 12 deletions include/zenkit/Misc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,15 @@ namespace zenkit {
}

[[nodiscard]] constexpr Mat3 transpose() const {
return Mat3{
columns[0][0], columns[1][0], columns[2][0],
columns[0][1], columns[1][1], columns[2][1],
columns[0][2], columns[1][2], columns[2][2]
};
return Mat3 {columns[0][0],
columns[1][0],
columns[2][0],
columns[0][1],
columns[1][1],
columns[2][1],
columns[0][2],
columns[1][2],
columns[2][2]};
}

[[nodiscard]] constexpr float const* pointer() const {
Expand Down Expand Up @@ -275,12 +279,22 @@ namespace zenkit {
}

[[nodiscard]] constexpr Mat4 transpose() const {
return Mat4 {
columns[0][0], columns[1][0], columns[2][0], columns[3][0],
columns[0][1], columns[1][1], columns[2][1], columns[3][1],
columns[0][2], columns[1][2], columns[2][2], columns[3][2],
columns[0][3], columns[1][3], columns[2][3], columns[3][3]
};
return Mat4 {columns[0][0],
columns[1][0],
columns[2][0],
columns[3][0],
columns[0][1],
columns[1][1],
columns[2][1],
columns[3][1],
columns[0][2],
columns[1][2],
columns[2][2],
columns[3][2],
columns[0][3],
columns[1][3],
columns[2][3],
columns[3][3]};
}

[[nodiscard]] constexpr float const* pointer() const {
Expand All @@ -292,7 +306,7 @@ namespace zenkit {
}

constexpr static Mat4 identity() {
return Mat4 {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
return Mat4 {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
}
};

Expand Down
4 changes: 2 additions & 2 deletions include/zenkit/Vfs.hh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright © 2023-2024 GothicKit Contributors.
// SPDX-License-Identifier: MIT
#pragma once
#include "Error.hh"
#include "Library.hh"
#include "Misc.hh"
#include "Mmap.hh"
#include "Error.hh"
#include "Stream.hh"
#include "Misc.hh"

#include <filesystem>
#include <memory>
Expand Down
8 changes: 4 additions & 4 deletions src/archive/ArchiveAscii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <array>
#include <charconv>
#include <cstring>
#include <sstream>
#include <ctime>
#include <sstream>
#include <stdexcept>
#include <utility>

Expand Down Expand Up @@ -158,9 +158,9 @@ namespace zenkit {
std::uint16_t r, g, b, a;
in >> r >> g >> b >> a;
return Color {static_cast<std::uint8_t>(r),
static_cast<std::uint8_t>(g),
static_cast<std::uint8_t>(b),
static_cast<std::uint8_t>(a)};
static_cast<std::uint8_t>(g),
static_cast<std::uint8_t>(b),
static_cast<std::uint8_t>(a)};
}

Vec3 ReadArchiveAscii::read_vec3() {
Expand Down
2 changes: 1 addition & 1 deletion src/archive/ArchiveBinary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include "zenkit/Error.hh"

#include <charconv>
#include <stdexcept>
#include <cstring>
#include <stdexcept>

namespace zenkit {
void ReadArchiveBinary::read_header() {
Expand Down

0 comments on commit bd6371e

Please sign in to comment.