Skip to content

Commit 31045b6

Browse files
IDeviceObject: updated documentation
1 parent 19b6884 commit 31045b6

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

Graphics/GraphicsEngine/include/DeviceObjectBase.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2024 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -74,15 +74,15 @@ class DeviceObjectBase : public ObjectBase<BaseInterface>
7474

7575
if (ObjDesc.Name != nullptr)
7676
{
77-
auto size = strlen(ObjDesc.Name) + 1;
78-
auto* NameCopy = ALLOCATE(GetStringAllocator(), "Object name copy", char, size);
77+
size_t size = strlen(ObjDesc.Name) + 1;
78+
char* NameCopy = ALLOCATE(GetStringAllocator(), "Object name copy", char, size);
7979
memcpy(NameCopy, ObjDesc.Name, size);
8080
m_Desc.Name = NameCopy;
8181
}
8282
else
8383
{
8484
size_t size = 16 + 2 + 1; // 0x12345678
85-
auto* AddressStr = ALLOCATE(GetStringAllocator(), "Object address string", char, size);
85+
char* AddressStr = ALLOCATE(GetStringAllocator(), "Object address string", char, size);
8686
snprintf(AddressStr, size, "0x%llX", static_cast<unsigned long long>(reinterpret_cast<size_t>(this)));
8787
m_Desc.Name = AddressStr;
8888
}

Graphics/GraphicsEngine/interface/DeviceObject.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2023 Diligent Graphics LLC
2+
* Copyright 2019-2025 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -57,44 +57,44 @@ DILIGENT_BEGIN_INTERFACE(IDeviceObject, IObject)
5757

5858
/// Returns unique identifier assigned to an object
5959

60-
/// \remarks Unique identifiers can be used to reliably check if two objects are identical.
61-
/// Note that the engine reuses memory reclaimed after an object has been released.
62-
/// For example, if a texture object is released and then another texture is created,
63-
/// the engine may return the same pointer, so pointer-to-pointer comparisons are not
64-
/// reliable. Unique identifiers, on the other hand, are guaranteed to be, well, unique.
60+
/// Unique identifiers can be used to reliably check if two objects are identical.
61+
/// Note that the engine reuses memory reclaimed after an object has been released.
62+
/// For example, if a texture object is released and then another texture is created,
63+
/// the engine may return the same pointer, so pointer-to-pointer comparisons are not
64+
/// reliable. Unique identifiers, on the other hand, are guaranteed to be, well, unique.
6565
///
66-
/// Unique identifiers are object-specifics, so, for instance, buffer identifiers
67-
/// are not comparable to texture identifiers.
66+
/// Unique identifiers are object-specifics, so, for instance, buffer identifiers
67+
/// are not comparable to texture identifiers.
6868
///
69-
/// Unique identifiers are only meaningful within one session. After an application
70-
/// restarts, all identifiers become invalid.
69+
/// Unique identifiers are only meaningful within one session. After an application
70+
/// restarts, all identifiers become invalid.
7171
///
72-
/// Valid identifiers are always positive values. Zero and negative values can never be
73-
/// assigned to an object and are always guaranteed to be invalid.
72+
/// Valid identifiers are always positive values. Zero and negative values can never be
73+
/// assigned to an object and are always guaranteed to be invalid.
7474
VIRTUAL Int32 METHOD(GetUniqueID)(THIS) CONST PURE;
7575

7676

77-
/// Stores a pointer to the user-provided data object, which
78-
/// may later be retrieved through GetUserData().
77+
/// Stores a pointer to the user-provided data object.
78+
79+
/// The data may later be retrieved through GetUserData().
7980
///
8081
/// \param [in] pUserData - Pointer to the user data object to store.
8182
///
8283
/// \note The method is not thread-safe and an application
8384
/// must externally synchronize the access.
8485
///
85-
/// The method keeps strong reference to the user data object.
86-
/// If an application needs to release the object, it
87-
/// should call SetUserData(nullptr);
86+
/// The method keeps strong reference to the user data object.
87+
/// If an application needs to release the object, it
88+
/// should call SetUserData(nullptr);
8889
VIRTUAL void METHOD(SetUserData)(THIS_
8990
IObject* pUserData) PURE;
9091

9192

92-
/// Returns a pointer to the user data object previously
93-
/// set with SetUserData() method.
94-
///
93+
/// Returns a pointer to the user data object previously set with SetUserData() method.
94+
9595
/// \return The pointer to the user data object.
9696
///
97-
/// \remarks The method does *NOT* call AddRef()
97+
/// \remarks The method does **NOT** call AddRef()
9898
/// for the object being returned.
9999
VIRTUAL IObject* METHOD(GetUserData)(THIS) CONST PURE;
100100
};

0 commit comments

Comments
 (0)