[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[657] mplayerxp
Brought to you by:
olov
|
From: <nic...@us...> - 2013-06-20 10:08:23
|
Revision: 657
http://sourceforge.net/p/mplayerxp/code/657
Author: nickols_k
Date: 2013-06-20 10:08:21 +0000 (Thu, 20 Jun 2013)
Log Message:
-----------
fix prefix printing
Modified Paths:
--------------
mplayerxp/libmpconf/cfgparser.cpp
mplayerxp/xmpcore/binary_packet.h
Modified: mplayerxp/libmpconf/cfgparser.cpp
===================================================================
--- mplayerxp/libmpconf/cfgparser.cpp 2013-06-20 09:16:33 UTC (rev 656)
+++ mplayerxp/libmpconf/cfgparser.cpp 2013-06-20 10:08:21 UTC (rev 657)
@@ -777,14 +777,14 @@
pfxlen=strlen(opts[i].name)+1;
if(!pfx.empty()) { pfxlen+=pfx.length(); newpfx=pfx; }
else newpfx="";
- newpfx+=opts[i].name;
- newpfx+=".";
+ if(newpfx.empty()) newpfx+=std::string("-");
+ newpfx+=std::string(opts[i].name)+".";
__show_options(ntabs+2,newpfx,(const mpxp_option_t *)opts[i].p);
} else if(opts[i].type<=CONF_TYPE_PRINT) {
std::ostringstream os;
for(n=0;n<ntabs;n++) mpxp_info<<" ";
if(!pfx.empty()) os<<std::left<<pfx;
- else os<<" ";
+ else os<<" -";
os<<opts[i].name;
mpxp_info<<std::left<<std::setw(25)<<os.str()<<" "<<opts[i].help;
if((opts[i].flags&CONF_NOCFG)==0) {
Modified: mplayerxp/xmpcore/binary_packet.h
===================================================================
--- mplayerxp/xmpcore/binary_packet.h 2013-06-20 09:16:33 UTC (rev 656)
+++ mplayerxp/xmpcore/binary_packet.h 2013-06-20 10:08:21 UTC (rev 657)
@@ -1,6 +1,7 @@
#ifndef BINARY_PACKET_HPP_INCLUDED
#define BINARY_PACKET_HPP_INCLUDED 1
#include "osdep/mplib.h"
+#include <typeinfo>
#include <iostream>
#include <sstream>
#include <stdexcept>
@@ -70,14 +71,14 @@
T& operator[](size_t idx) {
if((idx+1)*sizeof(T)<=size()) return ((T*)data())[idx];
std::ostringstream os;
- os<<"."<<get_caller_address()<<" => object_container["<<idx<<"]";
+ os<<"."<<get_caller_address()<<" => objects_container<"<<typeid(T).name()<<">["<<idx<<"]";
throw std::out_of_range(os.str());
}
const T& operator[](size_t idx) const {
if((idx+1)*sizeof(T)<=size()) return ((const T*)data())[idx];
std::ostringstream os;
- os<<"."<<get_caller_address()<<" => object_container["<<idx<<"] const";
+ os<<"."<<get_caller_address()<<" => objects_container"<<typeid(T).name()<<">["<<idx<<"] const";
throw std::out_of_range(os.str());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|