Skip to content
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

Replace boost::lexical_cast with TfStringify in python bindings #2657

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pxr/usd/sdf/pyListEditorProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ class SdfPyWrapListEditorProxy {

static std::string _GetStr(const Type& x)
{
return x._listEditor ?
boost::lexical_cast<std::string>(*x._listEditor) : std::string();
return x._listEditor ? TfStringify(*x._listEditor) : std::string();
}

static void _SetExplicitProxy(Type& x, const value_vector_type& v)
Expand Down
3 changes: 2 additions & 1 deletion pxr/usd/sdf/wrapAssetPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "pxr/base/vt/valueFromPython.h"
#include "pxr/base/tf/hash.h"
#include "pxr/base/tf/pyResultConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/vt/wrapArray.h"

#include <boost/python/class.hpp>
Expand All @@ -48,7 +49,7 @@ namespace {

static std::string _Str(SdfAssetPath const &self)
{
return boost::lexical_cast<std::string>(self);
return TfStringify(self);
}

static std::string
Expand Down
3 changes: 2 additions & 1 deletion pxr/usd/sdf/wrapTimeCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "pxr/base/vt/valueFromPython.h"
#include "pxr/base/tf/hash.h"
#include "pxr/base/tf/pyResultConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/vt/wrapArray.h"

#include <boost/python/class.hpp>
Expand All @@ -48,7 +49,7 @@ namespace {

static std::string _Str(SdfTimeCode const &self)
{
return boost::lexical_cast<std::string>(self);
return TfStringify(self);
}

static std::string
Expand Down
3 changes: 2 additions & 1 deletion pxr/usd/usd/wrapStageLoadRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyEnum.h"
#include "pxr/base/tf/pyResultConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/stringUtils.h"

using std::string;

Expand All @@ -44,7 +45,7 @@ namespace {

static std::string __str__(UsdStageLoadRules const &self)
{
return boost::lexical_cast<std::string>(self);
return TfStringify(self);
}

static string __repr__(UsdStageLoadRules const &self)
Expand Down
3 changes: 2 additions & 1 deletion pxr/usd/usd/wrapStagePopulationMask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "pxr/usd/usd/stagePopulationMask.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyResultConversions.h"
#include "pxr/base/tf/stringUtils.h"

using std::string;

Expand All @@ -40,7 +41,7 @@ namespace {

static std::string __str__(UsdStagePopulationMask const &self)
{
return boost::lexical_cast<std::string>(self);
return TfStringify(self);
}

static string __repr__(UsdStagePopulationMask const &self)
Expand Down
2 changes: 1 addition & 1 deletion pxr/usd/usd/wrapTimeCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static size_t __hash__(const UsdTimeCode &self) { return hash_value(self); }

static std::string _Str(const UsdTimeCode &self)
{
return boost::lexical_cast<std::string>(self);
return TfStringify(self);
}

static string __repr__(const UsdTimeCode &self)
Expand Down