From: <man...@us...> - 2014-12-16 10:14:29
|
Revision: 4654 http://sourceforge.net/p/modplug/code/4654 Author: manxorist Date: 2014-12-16 10:14:16 +0000 (Tue, 16 Dec 2014) Log Message: ----------- [Fix] iostreams are not copyable. Modified Paths: -------------- trunk/OpenMPT/mptrack/Childfrm.cpp trunk/OpenMPT/mptrack/Childfrm.h trunk/OpenMPT/mptrack/Moddoc.cpp Modified: trunk/OpenMPT/mptrack/Childfrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/Childfrm.cpp 2014-12-15 12:11:45 UTC (rev 4653) +++ trunk/OpenMPT/mptrack/Childfrm.cpp 2014-12-16 10:14:16 UTC (rev 4654) @@ -468,8 +468,8 @@ //end rewbs.customKeysAutoEffects -std::ostringstream CChildFrame::SerializeView() const -//--------------------------------------------------- +std::string CChildFrame::SerializeView() const +//-------------------------------------------- { std::ostringstream f(std::ios::out | std::ios::binary); // Version @@ -488,7 +488,7 @@ { mpt::IO::WriteVarInt(f, (uint32_t)view->SendMessage(WM_MOD_CTRLMSG, CTRLMSG_GETCURRENTINSTRUMENT)); // Instrument number } - return f; + return f.str(); } Modified: trunk/OpenMPT/mptrack/Childfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Childfrm.h 2014-12-15 12:11:45 UTC (rev 4653) +++ trunk/OpenMPT/mptrack/Childfrm.h 2014-12-16 10:14:16 UTC (rev 4654) @@ -124,7 +124,7 @@ void SetSplitterHeight(int x); int GetSplitterHeight(); - std::ostringstream SerializeView() const; + std::string SerializeView() const; void DeserializeView(FileReader &file); // Overrides Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2014-12-15 12:11:45 UTC (rev 4653) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2014-12-16 10:14:16 UTC (rev 4654) @@ -3005,7 +3005,7 @@ mpt::IO::WriteIntLE<int32_t>(f, Util::muldivr(rect.Width(), 1 << 30, width)); mpt::IO::WriteIntLE<int32_t>(f, Util::muldivr(rect.Height(), 1 << 30, height)); - std::string s = pChildFrm->SerializeView().str(); + std::string s = pChildFrm->SerializeView(); mpt::IO::WriteVarInt(f, s.size()); f << s; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |