]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mru.cpp
Merge commit '1132fe233cd201e0f8eb17cb1b96313f6a5cf3ec' into master-merge
[xonotic/netradiant.git] / radiant / mru.cpp
index dc0525029b1d87ffd28b797fc5ac218e1ba72008..452feaf69f6c08e6242a4d55b76a69405e4f4032 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "os/file.h"
 #include "generic/callback.h"
-#include "stream/stringstream.h"
 #include "convert.h"
 
 #include "gtkutil/menu.h"
@@ -50,9 +49,11 @@ inline const char* MRU_GetText( std::size_t index ){
 
 class EscapedMnemonic
 {
-StringBuffer m_buffer;
+private:
+       std::string m_buffer;
+
 public:
-EscapedMnemonic( std::size_t capacity ) : m_buffer( capacity ){
+       EscapedMnemonic() : m_buffer(){
        m_buffer.push_back( '_' );
 }
 const char* c_str() const {
@@ -81,7 +82,7 @@ inline EscapedMnemonic& operator<<( EscapedMnemonic& ostream, const T& t ){
 
 
 void MRU_updateWidget( std::size_t index, const char *filename ){
-       EscapedMnemonic mnemonic( 64 );
+       EscapedMnemonic mnemonic;
        mnemonic << Unsigned( index + 1 ) << "- " << filename;
        gtk_label_set_text_with_mnemonic( GTK_LABEL( gtk_bin_get_child( GTK_BIN( MRU_items[index] ) ) ), mnemonic.c_str() );
 }
@@ -173,7 +174,9 @@ void MRU_Activate( std::size_t index ){
 
 class LoadMRU
 {
+private:
 std::size_t m_number;
+
 public:
 LoadMRU( std::size_t number )
        : m_number( number ){