summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-03 04:30:43 -0500
committerGitHub <noreply@github.com>2025-12-03 04:30:43 -0500
commitd68b6c05d2acbed0fb7601d8066ea77752e72d67 (patch)
tree34e0f9782020683604b839b6436213e6531311a0
parent825b4f09ca6f551551c4f3be5d72517eab504860 (diff)
parent00ba5c7cde10e0a3330d305e90cff46c0ece69e4 (diff)
Merge pull request #102 from nekernel-org/stable
fix: commit in wrong branch.
-rw-r--r--src/kernel/NeKit/Config.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kernel/NeKit/Config.h b/src/kernel/NeKit/Config.h
index e53616a9..c9d1a62d 100644
--- a/src/kernel/NeKit/Config.h
+++ b/src/kernel/NeKit/Config.h
@@ -142,7 +142,8 @@ class ICodec {
return class_fac.template From<OutputClass>(type);
}
- /// @brief Convert T class to Y class.
+ /// @brief Convert T to a Y type.
+ /// @note The class must be serializable, otherwise this will fail.
/// @tparam T the class type of type.
/// @tparam Y the result class.
/// @param type the class to cast.
@@ -150,7 +151,7 @@ class ICodec {
template <typename T, typename Y>
Y As(T type) {
if (type.template IsSerializable()) {
- return reinterpret_cast<Char*>(type);
+ return type.template Error();
}
return type.template As<Y>();