bengtmartensson / bengtmartensson/Infrared4Arduino

Constructor IrSequence(const microseconds_t*, size_t length) with view semantic

Open
#88 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
74
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Presently, the constructor `IrSequence(const microseconds_t*, size_t length)` have "move-semantics", i.e. the first argument will be deleted by the destructor. This is sometimes not desirable. Possibly it violates the "const"-ness?

This behavior is documented, so not "bug".

A possible fix would be to have a base class with no deletion and a derived class which deletes.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the IrSequence(const microseconds_t*, size_t length) constructor and its destructor or ownership handling. Review the documented move-semantics behavior, then determine how a non-owning view should coexist with the existing deleting behavior; done means the view form does not delete caller-owned storage while existing semantics remain clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, cpp
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.