From 1de00e6c42ee6beaaa490104888ef09be1d4a0d4 Mon Sep 17 00:00:00 2001 From: Kane York Date: Sat, 1 Aug 2020 17:17:44 -0700 Subject: chore(3p/nix): apply google-readability-casting Command run: jq Reviewed-by: tazjin --- third_party/nix/src/nix-env/nix-env.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'third_party/nix/src/nix-env') diff --git a/third_party/nix/src/nix-env/nix-env.cc b/third_party/nix/src/nix-env/nix-env.cc index 585cfbe3f722..81eab2dedb20 100644 --- a/third_party/nix/src/nix-env/nix-env.cc +++ b/third_party/nix/src/nix-env/nix-env.cc @@ -1050,8 +1050,9 @@ static void opQuery(Globals& globals, Strings opFlags, Strings opArgs) { attrs["valid"] = isValid ? "1" : "0"; attrs["substitutable"] = hasSubs ? "1" : "0"; } else { - columns.push_back((std::string)(isInstalled ? "I" : "-") + - (isValid ? "P" : "-") + (hasSubs ? "S" : "-")); + columns.push_back(absl::StrCat((isInstalled ? "I" : "-"), + (isValid ? "P" : "-"), + (hasSubs ? "S" : "-"))); } } @@ -1102,7 +1103,7 @@ static void opQuery(Globals& globals, Strings opFlags, Strings opArgs) { attrs["maxComparedVersion"] = version; } } else { - std::string column = (std::string) "" + ch + " " + version; + std::string column = std::to_string(ch) + " " + version; if (diff == cvGreater && tty) { column = ANSI_RED + column + ANSI_NORMAL; } -- cgit 1.4.1