mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Generic MIDI control now saves+restores its state; PBD::ID now requires a buffer size for its print() method
git-svn-id: svn://localhost/ardour2/trunk@949 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5ad68cf2c5
commit
ffdf5ada61
31 changed files with 209 additions and 77 deletions
|
|
@ -40,16 +40,15 @@ ID::string_assign (string str)
|
|||
}
|
||||
|
||||
void
|
||||
ID::print (char* buf) const
|
||||
ID::print (char* buf, uint32_t bufsize) const
|
||||
{
|
||||
/* XXX sizeof buf is unknown. bad API design */
|
||||
snprintf (buf, 32, "%" PRIu64, _id);
|
||||
snprintf (buf, bufsize, "%" PRIu64, _id);
|
||||
}
|
||||
|
||||
string ID::to_s() const
|
||||
{
|
||||
char buf[32]; // see print()
|
||||
print(buf);
|
||||
print(buf, sizeof (buf));
|
||||
return string(buf);
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +63,7 @@ ostream&
|
|||
operator<< (ostream& ostr, const ID& _id)
|
||||
{
|
||||
char buf[32];
|
||||
_id.print (buf);
|
||||
_id.print (buf, sizeof (buf));
|
||||
ostr << buf;
|
||||
return ostr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue