Skip to content

Commit

Permalink
types: only add a streamFactory if use_ostream is true
Browse files Browse the repository at this point in the history
This was a bug in PrimitiveTypeInfo which caused it to register
a streamfactory handler which can't print the type contents in
case use_ostream was set to false. typegen for example leaves
use_ostream to false, causing it to install defunct stream
factories.

Signed-off-by: Peter Soetens <marieke@intermodalics.eu>
  • Loading branch information
mcopejans committed Jan 21, 2015
1 parent ce86e85 commit a4659bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rtt/types/PrimitiveTypeInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ namespace RTT
bool installTypeInfoObject(TypeInfo* ti) {
// Install the factories for primitive types
ti->setValueFactory( this->getSharedPtr() );
ti->setStreamFactory( this->getSharedPtr() );
if (use_ostream)
ti->setStreamFactory( this->getSharedPtr() );

// Install the type info object for T
internal::DataSourceTypeInfo<T>::value_type_info::TypeInfoObject = ti;
Expand Down

0 comments on commit a4659bb

Please sign in to comment.