Run wpiformat on merged repo (#1021)

This commit is contained in:
Tyler Veness
2018-05-13 17:09:56 -07:00
committed by Peter Johnson
parent 0babbf317c
commit 6729a7d6b1
481 changed files with 9581 additions and 6828 deletions

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_BASE64_H_
#define WPIUTIL_SUPPORT_BASE64_H_
#ifndef WPIUTIL_WPI_BASE64_H_
#define WPIUTIL_WPI_BASE64_H_
#include <cstddef>
#include <string>
@@ -33,4 +33,4 @@ StringRef Base64Encode(StringRef plain, SmallVectorImpl<char>& buf);
} // namespace wpi
#endif // WPIUTIL_SUPPORT_BASE64_H_
#endif // WPIUTIL_WPI_BASE64_H_

View File

@@ -4,8 +4,8 @@
// - see < http://opensource.org/licenses/BSD-2-Clause>
//
#ifndef WPIUTIL_SUPPORT_CONCURRENTQUEUE_H_
#define WPIUTIL_SUPPORT_CONCURRENTQUEUE_H_
#ifndef WPIUTIL_WPI_CONCURRENTQUEUE_H_
#define WPIUTIL_WPI_CONCURRENTQUEUE_H_
#include <queue>
#include <thread>
@@ -82,4 +82,4 @@ class ConcurrentQueue {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_CONCURRENTQUEUE_H_
#endif // WPIUTIL_WPI_CONCURRENTQUEUE_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_HTTPUTIL_H_
#define WPIUTIL_SUPPORT_HTTPUTIL_H_
#ifndef WPIUTIL_WPI_HTTPUTIL_H_
#define WPIUTIL_WPI_HTTPUTIL_H_
#include <memory>
#include <string>
@@ -145,4 +145,4 @@ class HttpConnection {
#include "HttpUtil.inl"
#endif // WPIUTIL_SUPPORT_HTTPUTIL_H_
#endif // WPIUTIL_WPI_HTTPUTIL_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_LOGGER_H_
#define WPIUTIL_SUPPORT_LOGGER_H_
#ifndef WPIUTIL_WPI_LOGGER_H_
#define WPIUTIL_WPI_LOGGER_H_
#include <functional>
@@ -97,4 +97,4 @@ class Logger {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_LOGGER_H_
#endif // WPIUTIL_WPI_LOGGER_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_TCPSOCKETS_NETWORKACCEPTOR_H_
#define WPIUTIL_TCPSOCKETS_NETWORKACCEPTOR_H_
#ifndef WPIUTIL_WPI_NETWORKACCEPTOR_H_
#define WPIUTIL_WPI_NETWORKACCEPTOR_H_
#include <memory>
@@ -29,4 +29,4 @@ class NetworkAcceptor {
} // namespace wpi
#endif // WPIUTIL_TCPSOCKETS_NETWORKACCEPTOR_H_
#endif // WPIUTIL_WPI_NETWORKACCEPTOR_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_TCPSOCKETS_NETWORKSTREAM_H_
#define WPIUTIL_TCPSOCKETS_NETWORKSTREAM_H_
#ifndef WPIUTIL_WPI_NETWORKSTREAM_H_
#define WPIUTIL_WPI_NETWORKSTREAM_H_
#include <cstddef>
@@ -45,4 +45,4 @@ class NetworkStream {
} // namespace wpi
#endif // WPIUTIL_TCPSOCKETS_NETWORKSTREAM_H_
#endif // WPIUTIL_WPI_NETWORKSTREAM_H_

View File

@@ -13,14 +13,15 @@
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_SUPPORT_PATH_H
#define LLVM_SUPPORT_PATH_H
#include "wpi/Twine.h"
#include <iterator>
#ifndef WPIUTIL_WPI_PATH_H_
#define WPIUTIL_WPI_PATH_H_
#include <stdint.h>
#include <iterator>
#include "wpi/Twine.h"
namespace wpi {
namespace sys {
namespace path {
@@ -51,7 +52,7 @@ class const_iterator
: public std::iterator<std::input_iterator_tag, const StringRef> {
StringRef Path; ///< The entire path.
StringRef Component; ///< The current component. Not necessarily in Path.
size_t Position; ///< The iterators current position within Path.
size_t Position; ///< The iterators current position within Path.
// An end iterator has Position = Path.size() + 1.
friend const_iterator begin(StringRef path);
@@ -60,7 +61,7 @@ class const_iterator
public:
reference operator*() const { return Component; }
pointer operator->() const { return &Component; }
const_iterator &operator++(); // preincrement
const_iterator& operator++(); // preincrement
bool operator==(const const_iterator &RHS) const;
bool operator!=(const const_iterator &RHS) const { return !(*this == RHS); }
@@ -77,7 +78,7 @@ class reverse_iterator
: public std::iterator<std::input_iterator_tag, const StringRef> {
StringRef Path; ///< The entire path.
StringRef Component; ///< The current component. Not necessarily in Path.
size_t Position; ///< The iterators current position within Path.
size_t Position; ///< The iterators current position within Path.
friend reverse_iterator rbegin(StringRef path);
friend reverse_iterator rend(StringRef path);
@@ -85,7 +86,7 @@ class reverse_iterator
public:
reference operator*() const { return Component; }
pointer operator->() const { return &Component; }
reverse_iterator &operator++(); // preincrement
reverse_iterator& operator++(); // preincrement
bool operator==(const reverse_iterator &RHS) const;
bool operator!=(const reverse_iterator &RHS) const { return !(*this == RHS); }
@@ -450,8 +451,8 @@ StringRef remove_leading_dotslash(StringRef path);
/// @result True if path was changed
bool remove_dots(SmallVectorImpl<char> &path, bool remove_dot_dot = false);
} // end namespace path
} // end namespace sys
} // end namespace wpi
} // namespace path
} // namespace sys
} // namespace wpi
#endif
#endif // WPIUTIL_WPI_PATH_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_SAFETHREAD_H_
#define WPIUTIL_SUPPORT_SAFETHREAD_H_
#ifndef WPIUTIL_WPI_SAFETHREAD_H_
#define WPIUTIL_WPI_SAFETHREAD_H_
#include <atomic>
#include <thread>
@@ -130,4 +130,4 @@ class SafeThreadOwner : public detail::SafeThreadOwnerBase {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_SAFETHREAD_H_
#endif // WPIUTIL_WPI_SAFETHREAD_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_TCPSOCKETS_SOCKETERROR_H_
#define WPIUTIL_TCPSOCKETS_SOCKETERROR_H_
#ifndef WPIUTIL_WPI_SOCKETERROR_H_
#define WPIUTIL_WPI_SOCKETERROR_H_
#include <string>
@@ -22,4 +22,4 @@ static inline std::string SocketStrerror() {
} // namespace wpi
#endif // WPIUTIL_TCPSOCKETS_SOCKETERROR_H_
#endif // WPIUTIL_WPI_SOCKETERROR_H_

View File

@@ -21,8 +21,8 @@
limitations under the License.
*/
#ifndef WPIUTIL_TCPSOCKETS_TCPACCEPTOR_H_
#define WPIUTIL_TCPSOCKETS_TCPACCEPTOR_H_
#ifndef WPIUTIL_WPI_TCPACCEPTOR_H_
#define WPIUTIL_WPI_TCPACCEPTOR_H_
#include <atomic>
#include <memory>
@@ -54,4 +54,4 @@ class TCPAcceptor : public NetworkAcceptor {
} // namespace wpi
#endif // WPIUTIL_TCPSOCKETS_TCPACCEPTOR_H_
#endif // WPIUTIL_WPI_TCPACCEPTOR_H_

View File

@@ -21,8 +21,8 @@
limitations under the License
*/
#ifndef WPIUTIL_TCPSOCKETS_TCPCONNECTOR_H_
#define WPIUTIL_TCPSOCKETS_TCPCONNECTOR_H_
#ifndef WPIUTIL_WPI_TCPCONNECTOR_H_
#define WPIUTIL_WPI_TCPCONNECTOR_H_
#include <memory>
#include <utility>
@@ -46,4 +46,4 @@ class TCPConnector {
} // namespace wpi
#endif // WPIUTIL_TCPSOCKETS_TCPCONNECTOR_H_
#endif // WPIUTIL_WPI_TCPCONNECTOR_H_

View File

@@ -21,8 +21,8 @@
limitations under the License.
*/
#ifndef WPIUTIL_TCPSOCKETS_TCPSTREAM_H_
#define WPIUTIL_TCPSOCKETS_TCPSTREAM_H_
#ifndef WPIUTIL_WPI_TCPSTREAM_H_
#define WPIUTIL_WPI_TCPSTREAM_H_
#include <cstddef>
#include <string>
@@ -68,4 +68,4 @@ class TCPStream : public NetworkStream {
} // namespace wpi
#endif // WPIUTIL_TCPSOCKETS_TCPSTREAM_H_
#endif // WPIUTIL_WPI_TCPSTREAM_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_UDPSOCKETS_UDPCLIENT_H_
#define WPIUTIL_UDPSOCKETS_UDPCLIENT_H_
#ifndef WPIUTIL_WPI_UDPCLIENT_H_
#define WPIUTIL_WPI_UDPCLIENT_H_
#include <string>
@@ -42,4 +42,4 @@ class UDPClient {
} // namespace wpi
#endif // WPIUTIL_UDPSOCKETS_UDPCLIENT_H_
#endif // WPIUTIL_WPI_UDPCLIENT_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_UIDVECTOR_H_
#define WPIUTIL_SUPPORT_UIDVECTOR_H_
#ifndef WPIUTIL_WPI_UIDVECTOR_H_
#define WPIUTIL_WPI_UIDVECTOR_H_
#include <utility>
#include <vector>
@@ -64,4 +64,4 @@ class UidVector {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_UIDVECTOR_H_
#endif // WPIUTIL_WPI_UIDVECTOR_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_DEPRECATED_H_
#define WPIUTIL_SUPPORT_DEPRECATED_H_
#ifndef WPIUTIL_WPI_DEPRECATED_H_
#define WPIUTIL_WPI_DEPRECATED_H_
// [[deprecated(msg)]] is a C++14 feature not supported by MSVC or GCC < 4.9.
// We provide an equivalent warning implementation for those compilers here.
@@ -30,4 +30,4 @@
#endif
#endif
#endif // WPIUTIL_SUPPORT_DEPRECATED_H_
#endif // WPIUTIL_WPI_DEPRECATED_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_HOSTNAME_H_
#define WPIUTIL_SUPPORT_HOSTNAME_H_
#ifndef WPIUTIL_WPI_HOSTNAME_H_
#define WPIUTIL_WPI_HOSTNAME_H_
#include <string>
@@ -20,4 +20,4 @@ std::string GetHostname();
StringRef GetHostname(SmallVectorImpl<char>& name);
} // namespace wpi
#endif // WPIUTIL_SUPPORT_HOSTNAME_H_
#endif // WPIUTIL_WPI_HOSTNAME_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_JNI_UTIL_H_
#define WPIUTIL_SUPPORT_JNI_UTIL_H_
#ifndef WPIUTIL_WPI_JNI_UTIL_H_
#define WPIUTIL_WPI_JNI_UTIL_H_
#include <jni.h>
@@ -44,8 +44,6 @@ std::string GetJavaStackTrace(JNIEnv* env, std::string* func) {
excludeFuncPrefix == nullptr ? StringRef() : excludeFuncPrefix);
}
// Finds a class and keep it as a global reference.
// Use with caution, as the destructor does NOT call DeleteGlobalRef due
// to potential shutdown issues with doing so.
@@ -73,7 +71,7 @@ class JClass {
jclass m_cls = nullptr;
};
template<typename T>
template <typename T>
class JGlobal {
public:
JGlobal() = default;
@@ -393,7 +391,7 @@ inline jbooleanArray MakeJBooleanArray(JNIEnv* env, ArrayRef<bool> arr) {
return jarr;
}
// Other MakeJ*Array conversions.
// Other MakeJ*Array conversions.
#define WPI_JNI_MAKEJARRAY(T, F) \
inline T##Array MakeJ##F##Array(JNIEnv* env, ArrayRef<T> arr) { \
@@ -623,4 +621,4 @@ class JException : public JClass {
} // namespace java
} // namespace wpi
#endif // WPIUTIL_SUPPORT_JNI_UTIL_H_
#endif // WPIUTIL_WPI_JNI_UTIL_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_LEB128_H_
#define WPIUTIL_SUPPORT_LEB128_H_
#ifndef WPIUTIL_WPI_LEB128_H_
#define WPIUTIL_WPI_LEB128_H_
#include <cstddef>
@@ -23,4 +23,4 @@ bool ReadUleb128(raw_istream& is, uint64_t* ret);
} // namespace wpi
#endif // WPIUTIL_SUPPORT_LEB128_H_
#endif // WPIUTIL_WPI_LEB128_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_MEMORY_H_
#define WPIUTIL_SUPPORT_MEMORY_H_
#ifndef WPIUTIL_WPI_MEMORY_H_
#define WPIUTIL_WPI_MEMORY_H_
#include <cstdlib>
#include <exception>
@@ -61,4 +61,4 @@ inline void* CheckedRealloc(void* ptr, size_t size) {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_MEMORY_H_
#endif // WPIUTIL_WPI_MEMORY_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_RAW_ISTREAM_H_
#define WPIUTIL_SUPPORT_RAW_ISTREAM_H_
#ifndef WPIUTIL_WPI_RAW_ISTREAM_H_
#define WPIUTIL_WPI_RAW_ISTREAM_H_
#include <algorithm>
#include <cstddef>
@@ -112,4 +112,4 @@ class raw_fd_istream : public raw_istream {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_RAW_ISTREAM_H_
#endif // WPIUTIL_WPI_RAW_ISTREAM_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_RAW_SOCKET_ISTREAM_H_
#define WPIUTIL_SUPPORT_RAW_SOCKET_ISTREAM_H_
#ifndef WPIUTIL_WPI_RAW_SOCKET_ISTREAM_H_
#define WPIUTIL_WPI_RAW_SOCKET_ISTREAM_H_
#include "wpi/raw_istream.h"
@@ -31,4 +31,4 @@ class raw_socket_istream : public raw_istream {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_RAW_SOCKET_ISTREAM_H_
#endif // WPIUTIL_WPI_RAW_SOCKET_ISTREAM_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_RAW_SOCKET_OSTREAM_H_
#define WPIUTIL_SUPPORT_RAW_SOCKET_OSTREAM_H_
#ifndef WPIUTIL_WPI_RAW_SOCKET_OSTREAM_H_
#define WPIUTIL_WPI_RAW_SOCKET_OSTREAM_H_
#include "wpi/raw_ostream.h"
@@ -39,4 +39,4 @@ class raw_socket_ostream : public raw_ostream {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_RAW_SOCKET_OSTREAM_H_
#endif // WPIUTIL_WPI_RAW_SOCKET_OSTREAM_H_

View File

@@ -17,8 +17,8 @@
-- Eugene Hopkinson <slowriot at voxelstorm dot com>
*/
#ifndef WPIUTIL_SUPPORT_SHA1_H_
#define WPIUTIL_SUPPORT_SHA1_H_
#ifndef WPIUTIL_WPI_SHA1_H_
#define WPIUTIL_WPI_SHA1_H_
#include <stdint.h>
@@ -49,4 +49,4 @@ class SHA1 {
} // namespace wpi
#endif // WPIUTIL_SUPPORT_SHA1_H_
#endif // WPIUTIL_WPI_SHA1_H_

View File

@@ -5,8 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#ifndef WPIUTIL_SUPPORT_TIMESTAMP_H_
#define WPIUTIL_SUPPORT_TIMESTAMP_H_
#ifndef WPIUTIL_WPI_TIMESTAMP_H_
#define WPIUTIL_WPI_TIMESTAMP_H_
#include <stdint.h>
@@ -68,4 +68,4 @@ uint64_t Now(void);
} // namespace wpi
#endif
#endif // WPIUTIL_SUPPORT_TIMESTAMP_H_
#endif // WPIUTIL_WPI_TIMESTAMP_H_