fix(msvc): Fix C4138 warning by adding space before commented parameter names

ISSUE:
MSVC compiler reports warning C4138: '*/' found outside of comment
for patterns like 'void */*p*/' where the pointer asterisk is immediately
followed by a comment start.

AFFECTED FILES:
- include/libipc/mem/new.h (line 30)
- src/libipc/platform/win/mutex.h (line 54)
- src/libipc/platform/win/semaphore.h (line 53)

CHANGES:
Changed 'type */*param*/' to 'type * /*param*/' (added space before comment)

Examples:
- void */*p*/       → void * /*p*/
- char const */*name*/ → char const * /*name*/

This resolves the MSVC warning while maintaining code functionality
and keeping the commented-out parameter names for documentation.
This commit is contained in:
木头云 2025-12-03 08:05:22 +00:00
parent 52ff081770
commit 874e0b25bc
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ class LIBIPC_EXPORT block_collector {
public:
virtual ~block_collector() noexcept = default;
virtual void *allocate(std::size_t /*bytes*/) noexcept = 0;
virtual void deallocate(void */*p*/, std::size_t /*bytes*/) noexcept = 0;
virtual void deallocate(void * /*p*/, std::size_t /*bytes*/) noexcept = 0;
};
/// \brief Matches the appropriate memory block resource based on a specified size.

View File

@ -55,7 +55,7 @@ public:
close();
}
static void clear_storage(char const */*name*/) noexcept {
static void clear_storage(char const * /*name*/) noexcept {
}
bool lock(std::uint64_t tm) noexcept {

View File

@ -54,7 +54,7 @@ public:
close();
}
static void clear_storage(char const */*name*/) noexcept {
static void clear_storage(char const * /*name*/) noexcept {
}
bool wait(std::uint64_t tm) noexcept {