mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Mark unused parameters in C++ code (#164912)
This PR adds unused parameter name comments in C++ declarations to improve code readability. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164912 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
a753ffa9af
commit
f231be25c6
@ -90,7 +90,7 @@ class class_ : public ::torch::detail::class_base {
|
||||
/// constructor taking an `int` and a `std::string` as argument.
|
||||
template <typename... Types>
|
||||
class_& def(
|
||||
torch::detail::types<void, Types...>,
|
||||
torch::detail::types<void, Types...> /*unused*/,
|
||||
std::string doc_string = "",
|
||||
std::initializer_list<arg> default_args =
|
||||
{}) { // Used in combination with
|
||||
@ -457,8 +457,8 @@ inline class_<CurClass> selective_class_(
|
||||
|
||||
template <class CurClass>
|
||||
inline detail::ClassNotSelected selective_class_(
|
||||
const std::string&,
|
||||
detail::SelectiveStr<false>) {
|
||||
const std::string& /*unused*/,
|
||||
detail::SelectiveStr<false> /*unused*/) {
|
||||
return detail::ClassNotSelected();
|
||||
}
|
||||
|
||||
@ -512,7 +512,7 @@ inline class_<CurClass> Library::class_(detail::SelectiveStr<true> className) {
|
||||
}
|
||||
|
||||
template <class CurClass>
|
||||
inline detail::ClassNotSelected Library::class_(detail::SelectiveStr<false>) {
|
||||
inline detail::ClassNotSelected Library::class_(detail::SelectiveStr<false> /*unused*/) {
|
||||
return detail::ClassNotSelected();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user