Remove numberToString() where possible
This commit is contained in:
parent
230a14fcf1
commit
5037713071
|
@ -128,7 +128,7 @@ void createBackupFile(const std::string &originalPath, std::string &backupPath,
|
|||
for(unsigned int i = 0; ; ++i) {
|
||||
if(backupDir.empty()) {
|
||||
if(i) {
|
||||
backupPath = originalPath % '.' % numberToString(i) + ".bak";
|
||||
backupPath = originalPath % '.' % i + ".bak";
|
||||
} else {
|
||||
backupPath = originalPath + ".bak";
|
||||
}
|
||||
|
|
|
@ -313,7 +313,7 @@ void Id3v2Tag::setVersion(byte majorVersion, byte revisionVersion)
|
|||
{
|
||||
m_majorVersion = majorVersion;
|
||||
m_revisionVersion = revisionVersion;
|
||||
m_version = '2' % '.' % numberToString(majorVersion) % '.' + numberToString(revisionVersion);
|
||||
m_version = argsToString('2', '.', majorVersion, '.', revisionVersion);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
7
margin.h
7
margin.h
|
@ -4,7 +4,6 @@
|
|||
#include "./global.h"
|
||||
|
||||
#include <c++utilities/conversion/types.h>
|
||||
#include <c++utilities/conversion/stringconversion.h>
|
||||
#include <c++utilities/conversion/stringbuilder.h>
|
||||
|
||||
#include <string>
|
||||
|
@ -123,11 +122,7 @@ inline constexpr bool Margin::isNull() const
|
|||
*/
|
||||
inline std::string Margin::toString() const
|
||||
{
|
||||
using namespace ConversionUtilities;
|
||||
return "top: " % numberToString(m_top)
|
||||
% "; left: " % numberToString(m_left)
|
||||
% "; bottom: " % numberToString(m_bottom)
|
||||
% "; right: " + numberToString(m_right);
|
||||
return ConversionUtilities::argsToString("top: ", m_top, "; left: ", m_left, "; bottom: ", m_bottom, "; right: ", m_right);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ void EbmlElement::internalParse()
|
|||
for(skipped = 0; /* TODO: add a sane limit here */; ++m_startOffset, --m_maxSize, ++skipped) {
|
||||
// check whether max size is valid
|
||||
if(maxTotalSize() < 2) {
|
||||
addNotification(NotificationType::Critical, "The EBML element at " % numberToString(startOffset()) + " is truncated or does not exist.", context);
|
||||
addNotification(NotificationType::Critical, argsToString("The EBML element at ", startOffset(), " is truncated or does not exist."), context);
|
||||
throw TruncatedDataException();
|
||||
}
|
||||
stream().seekg(startOffset());
|
||||
|
|
|
@ -49,7 +49,7 @@ Mp4Atom::Mp4Atom(GenericFileElement::implementationType &parent, uint64 startOff
|
|||
*/
|
||||
string Mp4Atom::parsingContext() const
|
||||
{
|
||||
return "parsing " % idToString() % " atom at " + numberToString(startOffset());
|
||||
return "parsing " % idToString() % " atom at " + startOffset();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -36,7 +36,7 @@ Mpeg4Descriptor::Mpeg4Descriptor(implementationType &parent, uint64 startOffset)
|
|||
*/
|
||||
string Mpeg4Descriptor::parsingContext() const
|
||||
{
|
||||
return "parsing " % idToString() % " descriptor at " + numberToString(startOffset());
|
||||
return "parsing " % idToString() % " descriptor at " + startOffset();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
4
size.h
4
size.h
|
@ -4,7 +4,6 @@
|
|||
#include "./global.h"
|
||||
|
||||
#include <c++utilities/conversion/types.h>
|
||||
#include <c++utilities/conversion/stringconversion.h>
|
||||
#include <c++utilities/conversion/stringbuilder.h>
|
||||
|
||||
#include <string>
|
||||
|
@ -103,8 +102,7 @@ inline constexpr bool Size::operator==(const Size &other) const
|
|||
*/
|
||||
inline std::string Size::toString() const
|
||||
{
|
||||
using namespace ConversionUtilities;
|
||||
return "width: " % numberToString(m_width) % ", height: " + numberToString(m_height);
|
||||
return ConversionUtilities::argsToString("width: ", m_width, ", height: ", m_height);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue