-
Notifications
You must be signed in to change notification settings - Fork 218
Fmt : v10 support #6608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.6_maintenance
Are you sure you want to change the base?
Fmt : v10 support #6608
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -233,7 +233,7 @@ void OIIOOutputDriver::write_render_tile( const Tile &tile ) | |
| for( int i = 0; i < layer.numChannels; ++i ) | ||
| { | ||
| spec.channelnames.push_back( | ||
| fmt::format( "{}{}{}", layerName, layerName.size() ? "." : "", g_channels[i] ) | ||
| fmt::format( "{}{}{}", layerName, layerName.size() ? "." : "", g_channels[i].string() ) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should have Cortex provide a formatter for InternedString, so we don't need to do this at all call sites. |
||
| ); | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1759,7 +1759,7 @@ void RenderController::updateInternal( const ProgressCallback &callback, const I | |
| IECore::Msg::Warning, "RenderController", | ||
| fmt::format( | ||
| "{} attribute edit{} required geometry to be regenerated", | ||
| m_failedAttributeEdits, m_failedAttributeEdits > 1 ? "s" : "" | ||
| m_failedAttributeEdits.load(), m_failedAttributeEdits > 1 ? "s" : "" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is another one that would be dealt with by |
||
| ) | ||
| ); | ||
| m_failedAttributeEdits = 0; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,12 +75,12 @@ void setParameterInternal( AtNode *node, AtString name, int parameterType, bool | |
| AtArray *a = ParameterAlgo::dataToArray( value, parameterType ); | ||
| if( !a ) | ||
| { | ||
| msg( Msg::Warning, messageContext, fmt::format( "Unable to create array from data of type \"{}\" for parameter \"{}\"", value->typeName(), name ) ); | ||
| msg( Msg::Warning, messageContext, fmt::format( "Unable to create array from data of type \"{}\" for parameter \"{}\"", value->typeName(), name.c_str() ) ); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are enough of these that perhaps it would be better to register a formatter for AtString? I think |
||
| return; | ||
| } | ||
| if( AiArrayGetType( a ) != parameterType ) | ||
| { | ||
| msg( Msg::Warning, messageContext, fmt::format( "Unable to create array of type {} from data of type \"{}\" for parameter \"{}\"", AiParamGetTypeName( parameterType ), value->typeName(), name ) ); | ||
| msg( Msg::Warning, messageContext, fmt::format( "Unable to create array of type {} from data of type \"{}\" for parameter \"{}\"", AiParamGetTypeName( parameterType ), value->typeName(), name.c_str() ) ); | ||
| return; | ||
| } | ||
| AiNodeSetArray( node, name, a ); | ||
|
|
@@ -99,7 +99,7 @@ void setParameterInternal( AtNode *node, AtString name, int parameterType, bool | |
| } | ||
| else | ||
| { | ||
| msg( Msg::Warning, "setParameter", fmt::format( "Int64Data value {} is out of range for parameter \"{}\"", data->readable(), name ) ); | ||
| msg( Msg::Warning, "setParameter", fmt::format( "Int64Data value {} is out of range for parameter \"{}\"", data->readable(), name.c_str() ) ); | ||
| } | ||
| } | ||
| else if( const IntData *data = dataCast<IntData>( name, value, messageContext ) ) | ||
|
|
@@ -117,7 +117,7 @@ void setParameterInternal( AtNode *node, AtString name, int parameterType, bool | |
| } | ||
| else | ||
| { | ||
| msg( Msg::Warning, "setParameter", fmt::format( "UInt64Data value {} is out of range for parameter \"{}\"", data->readable(), name ) ); | ||
| msg( Msg::Warning, "setParameter", fmt::format( "UInt64Data value {} is out of range for parameter \"{}\"", data->readable(), name.c_str() ) ); | ||
| } | ||
| } | ||
| else if( const IntData *data = runTimeCast<const IntData>( value ) ) | ||
|
|
@@ -251,7 +251,7 @@ void setParameterInternal( AtNode *node, AtString name, int parameterType, bool | |
| nodeStr = AiNodeEntryGetName( AiNodeGetNodeEntry( node ) ); | ||
| } | ||
|
|
||
| msg( Msg::Warning, messageContext, fmt::format( "Arnold parameter \"{}\" on node \"{}\" has unsupported type \"{}\".", name, nodeStr, AiParamGetTypeName( parameterType ) ) ); | ||
| msg( Msg::Warning, messageContext, fmt::format( "Arnold parameter \"{}\" on node \"{}\" has unsupported type \"{}\".", name.c_str(), nodeStr, AiParamGetTypeName( parameterType ) ) ); | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -396,7 +396,7 @@ void setParameter( AtNode *node, AtString name, const IECore::Data *value, const | |
| msg( | ||
| Msg::Warning, | ||
| messageContext, | ||
| fmt::format( "Unsupported data type \"{}\" for name \"{}\"", value->typeName(), name ) | ||
| fmt::format( "Unsupported data type \"{}\" for name \"{}\"", value->typeName(), name.c_str() ) | ||
| ); | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can
#include "fmt/std.h"to get automatically formatting of paths.