|
2 | 2 |
|
3 | 3 | #pragma once |
4 | 4 |
|
| 5 | +#include <cstdint> |
| 6 | + |
5 | 7 | #include <fatal/type/search.h> |
6 | 8 | #include <fatal/type/trie.h> |
7 | 9 | #include <folly/Conv.h> |
8 | 10 | #include <thrift/lib/cpp/util/EnumUtils.h> |
9 | 11 | #include <thrift/lib/cpp2/op/Get.h> |
10 | | -#include <thrift/lib/cpp2/reflection/reflection.h> |
11 | 12 |
|
12 | 13 | #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" |
13 | 14 | #include "fboss/thrift_visitors/gen-cpp2/results_types.h" |
@@ -365,7 +366,7 @@ struct NameToPathVisitor<apache::thrift::type::union_t<T>> { |
365 | 366 | path(ChildKeyT()), begin, curr, end, std::forward<Func>(f)); |
366 | 367 | }; |
367 | 368 |
|
368 | | - auto idTry = folly::tryTo<apache::thrift::field_id_t>(token); |
| 369 | + auto idTry = folly::tryTo<std::int16_t>(token); |
369 | 370 | if (!idTry.hasError()) { |
370 | 371 | fatal::scalar_search< |
371 | 372 | typename folly::remove_cvref_t<Path>::ChildrenById, |
@@ -402,7 +403,7 @@ struct NameToPathVisitor<apache::thrift::type::union_t<T>> { |
402 | 403 | path(ChildKeyT()), curr, end, std::forward<Func>(f)); |
403 | 404 | }; |
404 | 405 |
|
405 | | - auto idTry = folly::tryTo<apache::thrift::field_id_t>(token); |
| 406 | + auto idTry = folly::tryTo<std::int16_t>(token); |
406 | 407 | if (!idTry.hasError()) { |
407 | 408 | fatal::scalar_search< |
408 | 409 | typename folly::remove_cvref_t<Path>::ChildrenById, |
@@ -460,7 +461,7 @@ struct NameToPathVisitor<apache::thrift::type::struct_t<T>> { |
460 | 461 | path(ChildKeyT()), begin, curr, end, std::forward<Func>(f)); |
461 | 462 | }; |
462 | 463 |
|
463 | | - auto idTry = folly::tryTo<apache::thrift::field_id_t>(token); |
| 464 | + auto idTry = folly::tryTo<std::int16_t>(token); |
464 | 465 | if (!idTry.hasError()) { |
465 | 466 | fatal::scalar_search< |
466 | 467 | typename folly::remove_cvref_t<Path>::ChildrenById, |
@@ -496,7 +497,7 @@ struct NameToPathVisitor<apache::thrift::type::struct_t<T>> { |
496 | 497 | path(ChildKeyT()), curr, end, std::forward<Func>(f)); |
497 | 498 | }; |
498 | 499 |
|
499 | | - auto idTry = folly::tryTo<apache::thrift::field_id_t>(token); |
| 500 | + auto idTry = folly::tryTo<std::int16_t>(token); |
500 | 501 | if (!idTry.hasError()) { |
501 | 502 | fatal::scalar_search< |
502 | 503 | typename folly::remove_cvref_t<Path>::ChildrenById, |
|
0 commit comments