~mandel/dbus-cpp/name-acquired

« back to all changes in this revision

Viewing changes to src/core/dbus/message.cpp

  • Committer: Manuel de la Pena
  • Date: 2015-07-16 14:36:45 UTC
  • Revision ID: manuel.delapena@canonical.com-20150716143645-mtm6jyayhqzrzd91
No need to add that extra step in the push_boolean method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
 
299
299
void Message::Writer::push_boolean(bool value)
300
300
{
301
 
    dbus_bool_t bool_value = value ? TRUE : FALSE;
302
 
 
303
301
    if (!dbus_message_iter_append_basic(
304
302
                std::addressof(d->iter),
305
303
                static_cast<int>(ArgumentType::boolean),
306
 
                std::addressof(bool_value)))
 
304
                std::addressof(value)))
307
305
        throw std::runtime_error("Not enough memory to append data to message.");
308
306
}
309
307