Skip to content

Commit b6c35ec

Browse files
Unfriend qvi_hwpool_s in qvi_hwpool_dev_s. (#254)
Signed-off-by: Samuel K. Gutierrez <[email protected]>
1 parent 46f6e1f commit b6c35ec

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/qvi-hwpool.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ qvi_hwpool_dev_s::operator==(
193193
return m_uuid == x.m_uuid;
194194
}
195195

196+
qv_hw_obj_type_t
197+
qvi_hwpool_dev_s::type(void)
198+
const {
199+
return m_type;
200+
}
201+
196202
int
197203
qvi_hwpool_dev_s::id(
198204
qv_device_id_type_t format,
@@ -388,7 +394,7 @@ qvi_hwpool_s::add_device(
388394
const qvi_hwpool_dev_s &dev
389395
) {
390396
auto shdev = std::make_shared<qvi_hwpool_dev_s>(dev);
391-
m_devs.insert({dev.m_type, shdev});
397+
m_devs.insert({dev.type(), shdev});
392398
return QV_SUCCESS;
393399
}
394400

src/qvi-hwpool.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ struct qvi_hwpool_cpu_s : qvi_hwpool_res_s {
6868
* because we only maintain information relevant for user-facing operations.
6969
*/
7070
struct qvi_hwpool_dev_s : qvi_hwpool_res_s {
71-
/** Hardware pools are our friends. */
72-
friend qvi_hwpool_s;
7371
private:
7472
/** Device type. */
7573
qv_hw_obj_type_t m_type = QV_HW_OBJ_LAST;
@@ -99,6 +97,9 @@ struct qvi_hwpool_dev_s : qvi_hwpool_res_s {
9997
operator==(
10098
const qvi_hwpool_dev_s &x
10199
) const;
100+
/** Returns the device's type. */
101+
qv_hw_obj_type_t
102+
type(void) const ;
102103
/** Returns the device's ID string formatted as specified. */
103104
int
104105
id(

0 commit comments

Comments
 (0)