Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add CopyBytesFrom for array types #207

Open
AlanRosenthal opened this issue Nov 11, 2024 · 1 comment
Open

FR: Add CopyBytesFrom for array types #207

AlanRosenthal opened this issue Nov 11, 2024 · 1 comment
Labels
c++ api enhancement New feature or request good first issue Good for newcomers

Comments

@AlanRosenthal
Copy link

  0      [+8]  UInt:8[8]   identification_pattern

Ideally I'd be able to:

    pw::Result<emboss::FileHeaderWriter> result =
        MakeEmbossWriter<emboss::FileHeaderWriter>(file_header_data);
    if (!result.ok()) {
      return;
    }
    emboss::FileHeaderWriter writer = result.value();
    std::array<uint8_t, 8> identification_pattern_data = {0x62, 0x74, 0x73,
    0x6E, 0x6F, 0x6F, 0x70, 0x00};
    writer.identification_pattern().CopyBytesFrom(identification_pattern_data);
@reventlov
Copy link
Collaborator

It would probably be useful to add CopyBytesFrom() to all view types, not just arrays of bytes.

@reventlov reventlov added the enhancement New feature or request label Nov 11, 2024
@reventlov reventlov added good first issue Good for newcomers c++ api labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ api enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants