mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Update LLVM to latest upstream. (#1080)
Also change header guards to WPI header guards. Remove StringRef::c_str() customization, replacing the handful of uses with Twine or SmallString. TCPStream: Include errno.h and make Windows includes lowercase for consistency. Upstream LLVM version: eb4186cca7924fb1706357545311a2fa3de40c59
This commit is contained in:
@@ -262,9 +262,9 @@ std::shared_ptr<Value> LoadPersistentImpl::ReadBooleanValue() {
|
||||
|
||||
std::shared_ptr<Value> LoadPersistentImpl::ReadDoubleValue() {
|
||||
// need to convert to null-terminated string for std::strtod()
|
||||
wpi::SmallString<64> buf;
|
||||
wpi::SmallString<64> buf = m_line;
|
||||
char* end;
|
||||
double v = std::strtod(m_line.c_str(buf), &end);
|
||||
double v = std::strtod(buf.c_str(), &end);
|
||||
if (*end != '\0') {
|
||||
Warn("invalid double value");
|
||||
return nullptr;
|
||||
@@ -318,9 +318,9 @@ std::shared_ptr<Value> LoadPersistentImpl::ReadDoubleArrayValue() {
|
||||
std::tie(tok, m_line) = m_line.split(',');
|
||||
tok = tok.trim(" \t");
|
||||
// need to convert to null-terminated string for std::strtod()
|
||||
wpi::SmallString<64> buf;
|
||||
wpi::SmallString<64> buf = tok;
|
||||
char* end;
|
||||
double v = std::strtod(tok.c_str(buf), &end);
|
||||
double v = std::strtod(buf.c_str(), &end);
|
||||
if (*end != '\0') {
|
||||
Warn("invalid double value");
|
||||
return nullptr;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <wpi/Base64.h>
|
||||
#include <wpi/FileSystem.h>
|
||||
#include <wpi/Format.h>
|
||||
#include <wpi/SmallString.h>
|
||||
#include <wpi/StringExtras.h>
|
||||
|
||||
Reference in New Issue
Block a user