Include .h from .inc/.inl files (NFC) (#3017)

This helps both IDEs and linting tools.

Also add some missing braces.
This commit is contained in:
Peter Johnson
2020-12-31 11:26:53 -08:00
committed by GitHub
parent bf8f8710ea
commit b7e46c558f
23 changed files with 129 additions and 50 deletions

View File

@@ -61,6 +61,6 @@ template <typename T>
void CreateSingleProvider(const std::string& key,
WSRegisterFunc webRegisterFunc);
#include "WSHalProviders.inl"
} // namespace wpilibws
#include "WSHalProviders.inl"

View File

@@ -8,6 +8,10 @@
#include <string>
#include <utility>
#include "WSHalProviders.h"
namespace wpilibws {
template <typename T>
void CreateProviders(const std::string& prefix, int numChannels,
WSRegisterFunc webRegisterFunc) {
@@ -24,3 +28,5 @@ void CreateSingleProvider(const std::string& key,
auto ptr = std::make_unique<T>(key, key);
webRegisterFunc(key, std::move(ptr));
}
} // namespace wpilibws