Skip to content

Safer data handling#367

Merged
hhvrc merged 5 commits into
developfrom
feature/safer-data-handling
Aug 14, 2025
Merged

Safer data handling#367
hhvrc merged 5 commits into
developfrom
feature/safer-data-handling

Conversation

@hhvrc

@hhvrc hhvrc commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@hhvrc hhvrc self-assigned this Aug 14, 2025
@changeset-bot

changeset-bot Bot commented Aug 14, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3dae560

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-project-automation github-project-automation Bot moved this to Todo in Roadmap Aug 14, 2025
@LucHeart
LucHeart requested a review from Copilot August 14, 2025 22:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements safer data handling by introducing a type-safe TinyVec<T> container and replacing raw pointer/size pairs with tcb::span throughout the codebase.

Key Changes:

  • Introduced TinyVec<T> container as a replacement for std::vector and manual memory management
  • Replaced raw pointer/size parameter pairs with tcb::span for safer data passing
  • Modernized API interfaces to use type-safe containers and views

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/util/Base64Utils.cpp Refactored Base64 encoding/decoding to use spans and TinyVec
src/serialization/ Updated serialization callbacks to use spans instead of raw pointers
src/message_handlers/ Converted WebSocket message handlers to use span parameters
src/WebSocketDeFragger.cpp Replaced manual memory management with TinyVec
src/config/Config.cpp Updated configuration handling to use TinyVec
include/ Updated header files to use span and TinyVec types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/util/Base64Utils.cpp Outdated
Comment thread src/util/Base64Utils.cpp Outdated
Comment thread include/TinyVec.h Outdated
hhvrc and others added 4 commits August 15, 2025 00:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v18.1.3) reports: 2 file(s) not formatted
  • include/span.h
  • src/serial/command_handlers/rawconfig.cpp

Have any feedback or feature suggestions? Share it here.

@hhvrc
hhvrc merged commit 21f3b5e into develop Aug 14, 2025
40 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Aug 14, 2025
@hhvrc
hhvrc deleted the feature/safer-data-handling branch August 14, 2025 23:40
@hhvrc hhvrc added this to the 1.5.0 Release milestone Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants