Skip to content

Commit 774a41c

Browse files
committed
try vector helper from proto template
1 parent b4070a4 commit 774a41c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

bin/run-clang-format.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# Check if clang-format is installed
18+
if ! command -v clang-format >/dev/null 2>&1; then
19+
echo "Error: clang-format is not installed"
20+
echo "Please install it using: brew install clang-format"
21+
exit 1
22+
fi
23+
1724
find ./src -not -path "./src/viam/api" -type f \( -name \*.cpp -o -name \*.hpp \) | xargs clang-format -style=file -i -fallback-style=none "$@"

src/viam/sdk/config/resource.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ struct from_proto_impl<app::v1::ComponentConfig> {
8383
ResourceConfig operator()(const app::v1::ComponentConfig*) const;
8484
};
8585

86+
template <>
87+
struct from_proto_impl<service::discovery::v1::DiscoverResourcesResponse>{
88+
std::vector<ResourceConfig> operator()(const service::discovery::v1::DiscoverResourcesResponse*) const;
89+
};
90+
8691
} // namespace proto_convert_details
8792

8893
} // namespace sdk

0 commit comments

Comments
 (0)