Skip to content

Commit

Permalink
Merge pull request #292 from wheremyfoodat/qt
Browse files Browse the repository at this point in the history
clang-format Result headers
  • Loading branch information
wheremyfoodat authored Sep 27, 2023
2 parents b77ed3b + 8995bd2 commit 929a20b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion include/result/result_fnd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
DEFINE_HORIZON_RESULT_MODULE(Result::FND, FND);

namespace Result::FND {
DEFINE_HORIZON_RESULT(InvalidEnumValue, 1005, InvalidArgument, Permanent);
DEFINE_HORIZON_RESULT(InvalidEnumValue, 1005, InvalidArgument, Permanent);
};
2 changes: 1 addition & 1 deletion include/result/result_gsp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
DEFINE_HORIZON_RESULT_MODULE(Result::GSP, GSP);

namespace Result::GSP {
DEFINE_HORIZON_RESULT(SuccessRegisterIRQ, 519, Success, Success);
DEFINE_HORIZON_RESULT(SuccessRegisterIRQ, 519, Success, Success);
};
17 changes: 8 additions & 9 deletions include/result/result_kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
DEFINE_HORIZON_RESULT_MODULE(Result::Kernel, Kernel);

namespace Result::Kernel {
// Returned when a thread releases a mutex it does not own
DEFINE_HORIZON_RESULT(InvalidMutexRelease, 31, InvalidArgument, Permanent);
DEFINE_HORIZON_RESULT(NotFound, 1018, NotFound, Permanent);
DEFINE_HORIZON_RESULT(InvalidEnumValue, 1005, InvalidArgument, Permanent);
DEFINE_HORIZON_RESULT(InvalidHandle, 1015, InvalidArgument, Permanent);


static_assert(InvalidHandle == 0xD8E007F7, "conversion broken");
};
// Returned when a thread releases a mutex it does not own
DEFINE_HORIZON_RESULT(InvalidMutexRelease, 31, InvalidArgument, Permanent);
DEFINE_HORIZON_RESULT(NotFound, 1018, NotFound, Permanent);
DEFINE_HORIZON_RESULT(InvalidEnumValue, 1005, InvalidArgument, Permanent);
DEFINE_HORIZON_RESULT(InvalidHandle, 1015, InvalidArgument, Permanent);

static_assert(InvalidHandle == 0xD8E007F7, "conversion broken");
}; // namespace Result::Kernel
16 changes: 8 additions & 8 deletions include/result/result_os.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
DEFINE_HORIZON_RESULT_MODULE(Result::OS, OS);

namespace Result::OS {
DEFINE_HORIZON_RESULT(PortNameTooLong, 30, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(InvalidHandle, 1015, WrongArgument, Permanent);
DEFINE_HORIZON_RESULT(InvalidCombination, 1006, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(MisalignedAddress, 1009, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(MisalignedSize, 1010, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(OutOfRange, 1021, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(Timeout, 1022, StatusChanged, Info);
};
DEFINE_HORIZON_RESULT(PortNameTooLong, 30, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(InvalidHandle, 1015, WrongArgument, Permanent);
DEFINE_HORIZON_RESULT(InvalidCombination, 1006, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(MisalignedAddress, 1009, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(MisalignedSize, 1010, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(OutOfRange, 1021, InvalidArgument, Usage);
DEFINE_HORIZON_RESULT(Timeout, 1022, StatusChanged, Info);
}; // namespace Result::OS

0 comments on commit 929a20b

Please sign in to comment.