From f548c1d2adaa0c73937829258e5cd1ad6d035e42 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 10 Mar 2016 22:57:04 +0100 Subject: [PATCH] feature #4217: Postion ostringstreams at the end when initialized with a string --- src/market/MarketPlaceAppPool.cc | 9 ++++++--- src/market/MarketPlaceManagerDriver.cc | 2 +- src/market/MarketPlacePool.cc | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/market/MarketPlaceAppPool.cc b/src/market/MarketPlaceAppPool.cc index 6e41e5ee98..c14994543e 100644 --- a/src/market/MarketPlaceAppPool.cc +++ b/src/market/MarketPlaceAppPool.cc @@ -29,7 +29,8 @@ static int master_allocate(MarketPlaceApp * mp, string& error) vector values; std::string mp_xml; - std::ostringstream oss("Cannot allocate marketapp at federation master: "); + std::ostringstream oss("Cannot allocate marketapp at federation master: ", + std::ios::ate); mp->to_xml(mp_xml); @@ -158,7 +159,8 @@ int MarketPlaceAppPool::drop(PoolObjectSQL * objsql, std::string& error_msg) xmlrpc_c::value result; vector values; - std::ostringstream oss("Cannot drop marketapp at federation master: "); + std::ostringstream oss("Cannot drop marketapp at federation master: ", + std::ios::ate); try { @@ -268,7 +270,8 @@ int MarketPlaceAppPool::update(PoolObjectSQL * objsql) xmlrpc_c::value result; vector values; - std::ostringstream oss("Cannot update marketapp at federation master: "); + std::ostringstream oss("Cannot update marketapp at federation master: ", + std::ios::ate); try { diff --git a/src/market/MarketPlaceManagerDriver.cc b/src/market/MarketPlaceManagerDriver.cc index e9a9fb41ca..e105b67a15 100644 --- a/src/market/MarketPlaceManagerDriver.cc +++ b/src/market/MarketPlaceManagerDriver.cc @@ -360,7 +360,7 @@ static int delete_action( std::string source; std::string error; - std::ostringstream eoss("Error removing app from marketplace"); + std::ostringstream eoss("Error removing app from marketplace", std::ios::ate); MarketPlaceApp * app = apppool->get(id, true); diff --git a/src/market/MarketPlacePool.cc b/src/market/MarketPlacePool.cc index d6c0e1688e..7c34392fe6 100644 --- a/src/market/MarketPlacePool.cc +++ b/src/market/MarketPlacePool.cc @@ -141,7 +141,8 @@ int MarketPlacePool::allocate( vector values; std::string mp_xml; - std::ostringstream oss("Cannot allocate market at federation master: "); + std::ostringstream oss("Cannot allocate market at federation master: ", + std::ios::ate); mp->to_xml(mp_xml); delete mp;