+
Skip to content

Conversation

complexlogic
Copy link
Contributor

I'm currently working on #1149. In Matroska, some elements have a UID which is implemented as a 64 bit unsigned integer. ByteVector currently does not have conversions for ULongLong, only LongLong. Casting an unsigned integer type to a signed integer type is implementation-defined if the value is higher than the max value of the signed type, so I would like to have a ULongLong function available to avoid the cast.

While looking at the code, I made some other improvements as well. Here is a summary of the changes:

  • Added ByteVector::toULongLong, ByteVector::fromULongLong, and tests for both
  • Added ByteVector::fromUShort, and tests
  • Added tests for all existing integer-based ByteVector::from* functions. Currently, there are no tests for these functions
  • Fixed a function reference in the documentation for ByteVector::toLongLong (I presume this was a copy/paste error)

@ufleisch ufleisch merged commit b40b834 into taglib:master Oct 15, 2023
@complexlogic complexlogic deleted the bytevector branch October 15, 2023 12:38
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载