mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 18:39:50 +00:00
[message] improve scoping of Buffer constants (#11885)
This commit moves two global constants, `kBufferSize` and `kNumBuffers`, into their respective class scopes to improve encapsulation and avoid potential name conflicts. The `kBufferSize` constant is moved into the `Buffer` class as `Buffer::kSize`. As `kBufferSize` is a generic and commonly used name, this change prevents potential symbol collisions. Similarly, the `kNumBuffers` constant is moved into the `MessagePool` class, as it is exclusively used within that class. All usages of these constants have been updated throughout the codebase to reflect their new names.
This commit is contained in:
@@ -39,7 +39,7 @@ namespace ot {
|
||||
|
||||
void TestMessage(void)
|
||||
{
|
||||
static constexpr uint16_t kMaxSize = (kBufferSize * 3 + 24);
|
||||
static constexpr uint16_t kMaxSize = (Buffer::kSize * 3 + 24);
|
||||
static constexpr uint16_t kOffsetStep = 101;
|
||||
static constexpr uint16_t kLengthStep = 21;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user