Skip to content

Commit 72c048d

Browse files
authored
Merge pull request #25 from mawad-amd/fix-bad-auto
Fix bad auto [ROCm/rocshmem commit: 375d145]
2 parents 1ca413a + 2a87c64 commit 72c048d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

projects/rocshmem/src/backend_type.hpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ enum class BackendType { RO_BACKEND, GPU_IB_BACKEND };
6767
*/
6868
#ifdef USE_GPU_IB
6969
#define DISPATCH_RET(Func) \
70-
auto ret_val{0}; \
71-
ret_val = static_cast<GPUIBContext *>(this)->Func; \
70+
auto ret_val = static_cast<GPUIBContext *>(this)->Func; \
7271
return ret_val;
7372
#else
7473
#define DISPATCH_RET(Func) \
75-
auto ret_val{0}; \
76-
ret_val = static_cast<ROContext *>(this)->Func; \
74+
auto ret_val = static_cast<ROContext *>(this)->Func; \
7775
return ret_val;
7876
#endif
7977
/**
@@ -113,13 +111,11 @@ enum class BackendType { RO_BACKEND, GPU_IB_BACKEND };
113111

114112
#ifdef USE_GPU_IB
115113
#define HOST_DISPATCH_RET(Func) \
116-
auto ret_val{0}; \
117-
ret_val = static_cast<GPUIBHostContext *>(this)->Func; \
114+
auto ret_val = static_cast<GPUIBHostContext *>(this)->Func; \
118115
return ret_val;
119116
#else
120117
#define HOST_DISPATCH_RET(Func) \
121-
auto ret_val{0}; \
122-
ret_val = static_cast<ROHostContext *>(this)->Func; \
118+
auto ret_val = static_cast<ROHostContext *>(this)->Func; \
123119
return ret_val;
124120
#endif
125121

0 commit comments

Comments
 (0)