Skip to content

Commit

Permalink
Use empty() instead of comparing with size()
Browse files Browse the repository at this point in the history
alexkaratarakis committed Jan 23, 2018
1 parent a413b52 commit 80f1563
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion toolsrc/src/vcpkg.cpp
Original file line number Diff line number Diff line change
@@ -214,7 +214,7 @@ static void load_config()
static std::string trim_path_from_command_line(const std::string& full_command_line)
{
Checks::check_exit(
VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line");
VCPKG_LINE_INFO, !full_command_line.empty(), "Internal failure - cannot have empty command line");

if (full_command_line[0] == '"')
{
2 changes: 1 addition & 1 deletion toolsrc/src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
@@ -296,7 +296,7 @@ namespace vcpkg::Build
{
features.append(feature + ";");
}
if (features.size() > 0)
if (!features.empty())
{
features.pop_back();
}
2 changes: 1 addition & 1 deletion toolsrc/src/vcpkg/commands.cache.cpp
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ namespace vcpkg::Commands::Cache
Checks::exit_success(VCPKG_LINE_INFO);
}

if (args.command_arguments.size() == 0)
if (args.command_arguments.empty())
{
for (const BinaryParagraph& binary_paragraph : binary_paragraphs)
{

0 comments on commit 80f1563

Please sign in to comment.