* fix: don't rename target/names without numeric suffix on paste to non clashing namespace
This commit is contained in:
@@ -29,15 +29,16 @@
|
||||
#if 1
|
||||
class Postfix
|
||||
{
|
||||
unsigned int m_value;
|
||||
int m_value; // -1 is special value to handle empty postfix
|
||||
public:
|
||||
Postfix( const char* postfix ) : m_value( atoi( postfix ) ){
|
||||
Postfix( const char* postfix ) : m_value( string_empty( postfix )? -1 : atoi( postfix ) ){
|
||||
}
|
||||
unsigned int number() const {
|
||||
int number() const {
|
||||
return m_value;
|
||||
}
|
||||
void write( char* buffer ) const {
|
||||
sprintf( buffer, "%u", m_value );
|
||||
if( m_value != -1 )
|
||||
sprintf( buffer, "%i", m_value );
|
||||
}
|
||||
Postfix& operator++(){
|
||||
++m_value;
|
||||
|
||||
Reference in New Issue
Block a user