Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
drdanz committed Jul 27, 2020
1 parent 50d7e60 commit 2b123c2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/libYARP_os/src/yarp/os/Property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PropertyItem
singleton(rhs.singleton)
{
if (rhs.backing) {
backing.reset(new Property(*(rhs.backing))); // FIXME: std::make_unique
backing = std::make_unique<Property>(*(rhs.backing));
}
}

Expand All @@ -56,7 +56,7 @@ class PropertyItem
if (&rhs != this) {
bot = rhs.bot;
if (rhs.backing) {
backing.reset(new Property(*(rhs.backing))); // FIXME: std::make_unique
backing = std::make_unique<Property>(*(rhs.backing));
}
singleton = rhs.singleton;
}
Expand Down Expand Up @@ -171,7 +171,7 @@ class Property::Private
p->clear();
p->bot.clear();
p->bot.addString(key);
p->backing.reset(new Property()); // FIXME: std::make_unique
p->backing = std::make_unique<Property>();
return *(p->backing);
}

Expand Down Expand Up @@ -370,7 +370,7 @@ class Property::Private
for (int i = 0; i < n; i++) {
std::string name = namelist[i]->d_name;
free(namelist[i]);
int len = (int)name.length();
auto len = static_cast<int>(name.length());
if (len < 4) {
continue;
}
Expand Down Expand Up @@ -905,7 +905,7 @@ class Property::Private
if (pTmp != nullptr) {
*pTmp = '\0';
pTmp++;
while (((*pTmp) != 0) && (*pTmp == ' ')) {
while (*pTmp == ' ') {
pTmp++;
}
if (*pTmp == '\0') {
Expand Down Expand Up @@ -1065,7 +1065,7 @@ void Property::fromCommand(int argc, char* argv[], bool skipFirst, bool wipe)

void Property::fromCommand(int argc, const char* argv[], bool skipFirst, bool wipe)
{
fromCommand(argc, (char**)argv, skipFirst, wipe);
fromCommand(argc, const_cast<char**>(argv), skipFirst, wipe);
}

void Property::fromArguments(const char* arguments, bool wipe)
Expand Down Expand Up @@ -1143,7 +1143,7 @@ Bottle& Property::findGroup(const std::string& key) const
}
}

if (result != ((Bottle*)nullptr)) {
if (result != nullptr) {
return *result;
}
return Bottle::getNullBottle();
Expand Down

0 comments on commit 2b123c2

Please sign in to comment.