Skip to content

Add AppendUnaligned to base/bits.h - #1617

Open
yukawa wants to merge 1 commit into
google:masterfrom
ciceroaware:append_unaligned
Open

yukawa wants to merge 1 commit into
google:masterfrom
ciceroaware:append_unaligned

Conversation

@yukawa

@yukawa yukawa commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This commit aims to generalize a common code pattern observed in the repository without changing user-visible behavior.

The pattern we discuss here is appending integers to std::string in the native byte order, which is common around data serialization and packed data file generation.

There is no behavior change on any platform, and the generated data is unchanged.

Issue IDs

N/A

Steps to test new behaviors

  • OS: Windows 11 26H2
  • Steps:
    1. All the GitHub Actions still pass.

Comment thread src/base/bits.h Resolved
Comment thread src/base/bits_test.cc Resolved
This commit aims to generalize a common code pattern observed in the
repository without changing user-visible behavior.

The pattern we discuss here is appending integers to std::string in the
native byte order, which is common around data serialization and packed
data file generation.

There is no behavior change on any platform, and the generated data is
unchanged.
@yukawa

yukawa commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator Author

Also rebased onto master to address merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants