Qualifying "string" as std::string
PiperOrigin-RevId: 355948874 Change-Id: I02284fb8753bde69d12c54bd2b85be8040ea378b
This commit is contained in:
parent
911d9336e2
commit
8617a34cee
@ -22,7 +22,7 @@ limitations under the License.
|
||||
namespace tensorflow {
|
||||
namespace io {
|
||||
namespace internal {
|
||||
string JoinPathImpl(std::initializer_list<tensorflow::StringPiece> paths);
|
||||
std::string JoinPathImpl(std::initializer_list<tensorflow::StringPiece> paths);
|
||||
}
|
||||
|
||||
// Utility routines for processing filenames
|
||||
@ -43,7 +43,7 @@ string JoinPathImpl(std::initializer_list<tensorflow::StringPiece> paths);
|
||||
// string path = io::JoinPath(FLAGS_test_srcdir, filename);
|
||||
// string path = io::JoinPath("/full", "path", "to", "filename");
|
||||
template <typename... T>
|
||||
string JoinPath(const T&... args) {
|
||||
std::string JoinPath(const T&... args) {
|
||||
return internal::JoinPathImpl({args...});
|
||||
}
|
||||
#endif /* SWIG */
|
||||
@ -71,7 +71,7 @@ tensorflow::StringPiece Extension(tensorflow::StringPiece path);
|
||||
// "/alpha/beta/".
|
||||
//
|
||||
// Does not perform any path normalization.
|
||||
string CommonPathPrefix(absl::Span<string const> paths);
|
||||
std::string CommonPathPrefix(absl::Span<std::string const> paths);
|
||||
|
||||
// Collapse duplicate "/"s, resolve ".." and "." path elements, remove
|
||||
// trailing "/".
|
||||
@ -80,7 +80,7 @@ string CommonPathPrefix(absl::Span<string const> paths);
|
||||
// invoke any system calls (getcwd(2)) in order to resolve relative
|
||||
// paths with respect to the actual working directory. That is, this is purely
|
||||
// string manipulation, completely independent of process state.
|
||||
string CleanPath(tensorflow::StringPiece path);
|
||||
std::string CleanPath(tensorflow::StringPiece path);
|
||||
|
||||
// Populates the scheme, host, and path from a URI. scheme, host, and path are
|
||||
// guaranteed by this function to point into the contents of uri, even if
|
||||
@ -95,11 +95,12 @@ void ParseURI(tensorflow::StringPiece uri, tensorflow::StringPiece* scheme,
|
||||
|
||||
// Creates a URI from a scheme, host, and path. If the scheme is empty, we just
|
||||
// return the path.
|
||||
string CreateURI(tensorflow::StringPiece scheme, tensorflow::StringPiece host,
|
||||
tensorflow::StringPiece path);
|
||||
std::string CreateURI(tensorflow::StringPiece scheme,
|
||||
tensorflow::StringPiece host,
|
||||
tensorflow::StringPiece path);
|
||||
|
||||
// Creates a temporary file name with an extension.
|
||||
string GetTempFilename(const string& extension);
|
||||
std::string GetTempFilename(const std::string& extension);
|
||||
|
||||
// Reads the TEST_UNDECLARED_OUTPUTS_DIR environment variable, and if set
|
||||
// assigns `dir` to the value. `dir` is not modified if the environment variable
|
||||
@ -108,7 +109,7 @@ string GetTempFilename(const string& extension);
|
||||
//
|
||||
// Note: This function obviates the need to deal with Bazel's odd path decisions
|
||||
// on Windows, and should be preferred over a simple `getenv`.
|
||||
bool GetTestUndeclaredOutputsDir(string* dir);
|
||||
bool GetTestUndeclaredOutputsDir(std::string* dir);
|
||||
|
||||
} // namespace io
|
||||
} // namespace tensorflow
|
||||
|
@ -44,7 +44,7 @@ Status ReadFloatFromEnvVar(StringPiece env_var_name, float default_val,
|
||||
// Returns a string into "value" from the environmental variable "env_var_name".
|
||||
// If it is unset, the default value is used.
|
||||
Status ReadStringFromEnvVar(StringPiece env_var_name, StringPiece default_val,
|
||||
string* value);
|
||||
std::string* value);
|
||||
|
||||
} // namespace tensorflow
|
||||
|
||||
|
@ -95,7 +95,7 @@ std::ostream& operator<<(std::ostream& os, ComputationType ty) {
|
||||
return os << ComputationTypeString(ty);
|
||||
}
|
||||
|
||||
string DataTypeString(DataType ty) {
|
||||
std::string DataTypeString(DataType ty) {
|
||||
switch (ty) {
|
||||
case DataType::kHalf:
|
||||
return "f16";
|
||||
|
@ -134,7 +134,7 @@ enum class PointerMode {
|
||||
};
|
||||
|
||||
// Converts a ComputationType to a string.
|
||||
string DataTypeString(DataType ty);
|
||||
std::string DataTypeString(DataType ty);
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, DataType ty);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user