Skip to content

Commit

Permalink
Use to_string instead of our custom implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed May 4, 2024
1 parent 2924538 commit af2139c
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Magick++/lib/SecurityPolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bool Magick::SecurityPolicy::precision(const int precision_)
string
value;

value=toString(precision_);
value=to_string(precision_);
return(setValue(SystemPolicyDomain,"precision",value));
}

Expand All @@ -41,7 +41,7 @@ bool Magick::SecurityPolicy::maxMemoryRequest(const MagickSizeType limit_)
string
value;

value=toString(limit_);
value=to_string(limit_);
return(setValue(SystemPolicyDomain,"max-memory-request",value));
}

Expand All @@ -50,7 +50,7 @@ bool Magick::SecurityPolicy::maxProfileSize(const MagickSizeType limit_)
string
value;

value=toString(limit_);
value=to_string(limit_);
return(setValue(SystemPolicyDomain,"max-profile-size",value));
}

Expand All @@ -59,7 +59,7 @@ bool Magick::SecurityPolicy::shred(const int passes_)
string
value;

value=toString(passes_);
value=to_string(passes_);
return(setValue(SystemPolicyDomain,"shred",value));
}

Expand All @@ -79,11 +79,3 @@ bool Magick::SecurityPolicy::setValue(const PolicyDomain domain_,
ThrowPPException(false);
return(status != MagickFalse);
}

template <typename T>
std::string Magick::SecurityPolicy::toString(const T& value)
{
stringstream ss;
ss << value;
return ss.str();
}

0 comments on commit af2139c

Please sign in to comment.