mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Change argument to Tempvar constructor to size_t, avoids conversion warning in template construction
This commit is contained in:
parent
6398329cd5
commit
718cced7cd
2 changed files with 3 additions and 3 deletions
|
@ -7,10 +7,10 @@
|
||||||
namespace zeek::detail
|
namespace zeek::detail
|
||||||
{
|
{
|
||||||
|
|
||||||
TempVar::TempVar(int num, const TypePtr& t, ExprPtr _rhs) : type(t)
|
TempVar::TempVar(size_t num, const TypePtr& t, ExprPtr _rhs) : type(t)
|
||||||
{
|
{
|
||||||
char buf[8192];
|
char buf[8192];
|
||||||
snprintf(buf, sizeof buf, "#%d", num);
|
snprintf(buf, sizeof buf, "#%zu", num);
|
||||||
name = buf;
|
name = buf;
|
||||||
rhs = std::move(_rhs);
|
rhs = std::move(_rhs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace zeek::detail
|
||||||
class TempVar
|
class TempVar
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TempVar(int num, const TypePtr& t, ExprPtr rhs);
|
TempVar(size_t num, const TypePtr& t, ExprPtr rhs);
|
||||||
|
|
||||||
const char* Name() const { return name.data(); }
|
const char* Name() const { return name.data(); }
|
||||||
const zeek::Type* Type() const { return type.get(); }
|
const zeek::Type* Type() const { return type.get(); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue