Fix linux/gcc compilation

This commit is contained in:
Marianne Gagnon 2014-02-13 18:57:51 -05:00
parent 8227e1c092
commit fd8496ffba
2 changed files with 4 additions and 2 deletions

View File

@ -287,7 +287,7 @@ void Profiler::draw()
if (m_first_capture_sweep) if (m_first_capture_sweep)
m_capture_report_buffer->getStdStream() << "\"" << m.name << "\";"; m_capture_report_buffer->getStdStream() << "\"" << m.name << "\";";
else else
m_capture_report_buffer->getStdStream() << (int)std::round((m.end - m.start) * 1000) << ";"; m_capture_report_buffer->getStdStream() << (int)round((m.end - m.start) * 1000) << ";";
} }
core::rect<s32> pos((s32)( x_offset + factor*m.start ), core::rect<s32> pos((s32)( x_offset + factor*m.start ),
(s32)( y_offset + i*line_height ), (s32)( y_offset + i*line_height ),

View File

@ -24,6 +24,8 @@
#include <stack> #include <stack>
#include <string> #include <string>
#include <streambuf> #include <streambuf>
#include <ostream>
#include <iostream>
class Profiler; class Profiler;
@ -60,7 +62,7 @@ struct ostreambuf : public std::basic_streambuf<char_type, std::char_traits<char
ostreambuf(char_type* buffer, std::streamsize bufferLength) ostreambuf(char_type* buffer, std::streamsize bufferLength)
{ {
// set the "put" pointer the start of the buffer and record it's length. // set the "put" pointer the start of the buffer and record it's length.
setp(buffer, buffer + bufferLength); this->setp(buffer, buffer + bufferLength);
} }
}; };