pUrl = new Url(argv[1].ToStdString());
}
- MainForm *m = new MainForm(nullptr, pUrl);
+ auto *m = new MainForm(nullptr, pUrl);
m->Show();
return true;
BIO_push(bio64, biomem);
BIO_set_flags(bio64, BIO_FLAGS_BASE64_NO_NL);
- char *outbuf = new char[input.GetLength()];
+ auto *outbuf = new char[input.GetLength()];
size_t len = 0;
int rc;
bool ValidateName(const String& type, const String& name) const override
{
Type::Ptr ptype = Type::GetByName(type);
- ConfigType *dtype = dynamic_cast<ConfigType *>(ptype.get());
+ auto *dtype = dynamic_cast<ConfigType *>(ptype.get());
if (!dtype)
return false;
StdioStream::Ptr sfp = new StdioStream(&fp, false);
for (const Type::Ptr& type : Type::GetAllTypes()) {
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
if (!dtype)
continue;
unsigned long no_state = 0;
for (const Type::Ptr& type : Type::GetAllTypes()) {
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
if (!dtype)
continue;
void ConfigObject::StopObjects()
{
for (const Type::Ptr& type : Type::GetAllTypes()) {
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
if (!dtype)
continue;
void ConfigObject::DumpModifiedAttributes(const std::function<void(const ConfigObject::Ptr&, const String&, const Value&)>& callback)
{
for (const Type::Ptr& type : Type::GetAllTypes()) {
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
if (!dtype)
continue;
ConfigObject::Ptr ConfigObject::GetObject(const String& type, const String& name)
{
Type::Ptr ptype = Type::GetByName(type);
- ConfigType *ctype = dynamic_cast<ConfigType *>(ptype.get());
+ auto *ctype = dynamic_cast<ConfigType *>(ptype.get());
if (!ctype)
return nullptr;
static intrusive_ptr<T> GetObject(const String& name)
{
typedef TypeImpl<T> ObjType;
- ObjType *ptype = static_cast<ObjType *>(T::TypeInstance.get());
+ auto *ptype = static_cast<ObjType *>(T::TypeInstance.get());
return static_pointer_cast<T>(ptype->GetObject(name));
}
if (it->second == object)
return;
- Type *type = dynamic_cast<Type *>(this);
+ auto *type = dynamic_cast<Type *>(this);
BOOST_THROW_EXCEPTION(ScriptError("An object with type '" + type->GetName() + "' and name '" + name + "' already exists (" +
Convert::ToString(it->second->GetDebugInfo()) + "), new declaration: " + Convert::ToString(object->GetDebugInfo()),
else
return nullptr;
#else /* __GLIBCXX__ */
- const libcxx_type_info *srcInfo = static_cast<const libcxx_type_info *>(src);
- const libcxx_type_info *dstInfo = static_cast<const libcxx_type_info *>(dst);
+ const auto *srcInfo = static_cast<const libcxx_type_info *>(src);
+ const auto *dstInfo = static_cast<const libcxx_type_info *>(dst);
void *adj = obj;
extern "C"
void __cxa_throw(void *obj, TYPEINFO_TYPE *pvtinfo, void (*dest)(void *))
{
- std::type_info *tinfo = static_cast<std::type_info *>(pvtinfo);
+ auto *tinfo = static_cast<std::type_info *>(pvtinfo);
typedef void (*cxa_throw_fn)(void *, std::type_info *, void (*)(void *)) __attribute__((noreturn));
static cxa_throw_fn real_cxa_throw;
#ifndef NO_CAST_EXCEPTION
void *uex = cast_exception(obj, tinfo, &typeid(user_error));
- boost::exception *ex = reinterpret_cast<boost::exception *>(cast_exception(obj, tinfo, &typeid(boost::exception)));
+ auto *ex = reinterpret_cast<boost::exception *>(cast_exception(obj, tinfo, &typeid(boost::exception)));
if (!uex) {
#endif /* NO_CAST_EXCEPTION */
String message = ex.what();
- const ValidationError *vex = dynamic_cast<const ValidationError *>(&ex);
+ const auto *vex = dynamic_cast<const ValidationError *>(&ex);
if (message.IsEmpty())
result << boost::diagnostic_information(ex) << "\n";
else
result << "Error: " << message << "\n";
- const ScriptError *dex = dynamic_cast<const ScriptError *>(&ex);
+ const auto *dex = dynamic_cast<const ScriptError *>(&ex);
if (dex && !dex->GetDebugInfo().Path.IsEmpty())
ShowCodeLocation(result, dex->GetDebugInfo());
ShowCodeLocation(result, di);
}
- const user_error *uex = dynamic_cast<const user_error *>(&ex);
- const posix_error *pex = dynamic_cast<const posix_error *>(&ex);
+ const auto *uex = dynamic_cast<const user_error *>(&ex);
+ const auto *pex = dynamic_cast<const posix_error *>(&ex);
if (!uex && !pex && verbose) {
const StackTrace *st = boost::get_error_info<StackTraceErrorInfo>(ex);
if (newSize == m_AllocSize)
return;
- char *newBuffer = static_cast<char *>(realloc(m_Buffer, newSize));
+ auto *newBuffer = static_cast<char *>(realloc(m_Buffer, newSize));
if (!newBuffer)
BOOST_THROW_EXCEPTION(std::bad_alloc());
void FileLogger::ReopenLogFile()
{
- std::ofstream *stream = new std::ofstream();
+ auto *stream = new std::ofstream();
String path = GetPath();
static int DecodeNull(void *ctx)
{
- JsonContext *context = static_cast<JsonContext *>(ctx);
+ auto *context = static_cast<JsonContext *>(ctx);
try {
context->AddValue(Empty);
static int DecodeBoolean(void *ctx, int value)
{
- JsonContext *context = static_cast<JsonContext *>(ctx);
+ auto *context = static_cast<JsonContext *>(ctx);
try {
context->AddValue(static_cast<bool>(value));
static int DecodeNumber(void *ctx, const char *str, yajl_size len)
{
- JsonContext *context = static_cast<JsonContext *>(ctx);
+ auto *context = static_cast<JsonContext *>(ctx);
try {
String jstr = String(str, str + len);
static int DecodeString(void *ctx, const unsigned char *str, yajl_size len)
{
- JsonContext *context = static_cast<JsonContext *>(ctx);
+ auto *context = static_cast<JsonContext *>(ctx);
try {
context->AddValue(String(str, str + len));
static int DecodeStartMap(void *ctx)
{
- JsonContext *context = static_cast<JsonContext *>(ctx);
+ auto *context = static_cast<JsonContext *>(ctx);
try {
context->Push(new Dictionary());
static int DecodeEndMapOrArray(void *ctx)
{
- JsonContext *context = static_cast<JsonContext *>(ctx);
+ auto *context = static_cast<JsonContext *>(ctx);
try {
context->AddValue(context->Pop().EValue);
static int DecodeStartArray(void *ctx)
{
- JsonContext *context = static_cast<JsonContext *>(ctx);
+ auto *context = static_cast<JsonContext *>(ctx);
try {
context->Push(new Array());
while (likely(!__sync_bool_compare_and_swap(&object->m_Mutex, I2MUTEX_UNLOCKED, I2MUTEX_LOCKED))) {
#endif /* _WIN32 */
if (likely(object->m_Mutex > I2MUTEX_LOCKED)) {
- boost::recursive_mutex *mtx = reinterpret_cast<boost::recursive_mutex *>(object->m_Mutex);
+ auto *mtx = reinterpret_cast<boost::recursive_mutex *>(object->m_Mutex);
mtx->lock();
return;
it++;
}
- boost::recursive_mutex *mtx = new boost::recursive_mutex();
+ auto *mtx = new boost::recursive_mutex();
mtx->lock();
#ifdef _WIN32
# ifdef _WIN64
return Empty;
}
- int *fds = (int *)CMSG_DATA(cmsg);
+ auto *fds = (int *)CMSG_DATA(cmsg);
Array::Ptr arguments = request->Get("arguments");
Dictionary::Ptr extraEnvironment = request->Get("extraEnvironment");
bool adjustPriority = request->Get("adjustPriority");
// build argv
- char **argv = new char *[arguments->GetLength() + 1];
+ auto **argv = new char *[arguments->GetLength() + 1];
for (unsigned int i = 0; i < arguments->GetLength(); i++) {
String arg = arguments->Get(i);
while (environ[envc])
envc++;
- char **envp = new char *[envc + (extraEnvironment ? extraEnvironment->GetLength() : 0) + 2];
+ auto **envp = new char *[envc + (extraEnvironment ? extraEnvironment->GetLength() : 0) + 2];
for (int i = 0; i < envc; i++)
envp[i] = strdup(environ[i]);
break;
}
- char *mbuf = new char[length];
+ auto *mbuf = new char[length];
size_t count = 0;
while (count < length) {
Array::SizeType len;
{
ObjectLock olock(arr1), xlock(arr2), ylock(result);
- Array::Iterator it = std::set_intersection(arr1->Begin(), arr1->End(), arr2->Begin(), arr2->End(), result->Begin());
+ auto it = std::set_intersection(arr1->Begin(), arr1->End(), arr2->Begin(), arr2->End(), result->Begin());
len = it - result->Begin();
}
result->Resize(len);
facility = "config";
message = arguments[0];
} else {
- int sval = static_cast<int>(arguments[0]);
+ auto sval = static_cast<int>(arguments[0]);
severity = static_cast<LogSeverity>(sval);
facility = arguments[1];
message = arguments[2];
else
ptype = Type::GetByName(vtype);
- ConfigType *ctype = dynamic_cast<ConfigType *>(ptype.get());
+ auto *ctype = dynamic_cast<ConfigType *>(ptype.get());
if (!ctype)
return nullptr;
if (!type)
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid type: Must not be null"));
- ConfigType *ctype = dynamic_cast<ConfigType *>(type.get());
+ auto *ctype = dynamic_cast<ConfigType *>(type.get());
if (!ctype)
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid type: Type must inherit from 'ConfigObject'"));
int TlsStream::ValidateCertificate(int preverify_ok, X509_STORE_CTX *ctx)
{
- SSL *ssl = static_cast<SSL *>(X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()));
- TlsStream *stream = static_cast<TlsStream *>(SSL_get_ex_data(ssl, m_SSLIndex));
+ auto *ssl = static_cast<SSL *>(X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()));
+ auto *stream = static_cast<TlsStream *>(SSL_get_ex_data(ssl, m_SSLIndex));
if (!preverify_ok) {
stream->m_VerifyOK = false;
String RandomString(int length)
{
- unsigned char *bytes = new unsigned char[length];
+ auto *bytes = new unsigned char[length];
if (!RAND_bytes(bytes, length)) {
delete [] bytes;
<< errinfo_openssl_error(ERR_peek_error()));
}
- char *output = new char[length * 2 + 1];
+ auto *output = new char[length * 2 + 1];
for (int i = 0; i < length; i++)
sprintf(output + 2 * i, "%02x", bytes[i]);
String Utility::FormatDateTime(const char *format, double ts)
{
char timestamp[128];
- time_t tempts = (time_t)ts; /* We don't handle sub-second timestamps here just yet. */
+ auto tempts = (time_t)ts; /* We don't handle sub-second timestamps here just yet. */
tm tmthen;
#ifdef _MSC_VER
if (!IsObject())
BOOST_THROW_EXCEPTION(std::runtime_error("Cannot convert value of type '" + GetTypeName() + "' to an object."));
- const Object::Ptr& object = Get<Object::Ptr>();
+ const auto& object = Get<Object::Ptr>();
ASSERT(object);
#endif /*_WIN32*/
}
else {
- std::ofstream *ofs = new std::ofstream();
+ auto *ofs = new std::ofstream();
ofs->open(path.CStr(), std::ios::out | std::ios::trunc);
m_Stream = ofs;
}
bool TroubleshootCommand::PrintVarsFile(const String& path, const bool console) {
if (!console) {
- std::ofstream *ofs = new std::ofstream();
+ auto *ofs = new std::ofstream();
ofs->open((path+"-vars").CStr(), std::ios::out | std::ios::trunc);
if (!ofs->is_open())
return false;
void CompatLogger::ScheduleNextRotation()
{
- time_t now = (time_t)Utility::GetTime();
+ auto now = (time_t)Utility::GetTime();
String method = GetRotationMethod();
tm tmthen;
{
m_ObjectsPath = filename;
- std::fstream *fp = new std::fstream();
+ auto *fp = new std::fstream();
try {
m_ObjectsTempFile = Utility::CreateTempFile(filename + ".XXXXXX", 0600, *fp);
} catch (const std::exception& ex) {
String name = item_name;
- NameComposer *nc = dynamic_cast<NameComposer *>(type.get());
+ auto *nc = dynamic_cast<NameComposer *>(type.get());
if (nc) {
if (name.IsEmpty())
BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), m_DebugInfo));
}
- ConfigType *ctype = dynamic_cast<ConfigType *>(m_Type.get());
+ auto *ctype = dynamic_cast<ConfigType *>(m_Type.get());
if (!ctype) {
std::ostringstream msgbuf;
}
#endif /* I2_DEBUG */
- DictExpression *dexpr = new DictExpression(std::move(m_Expressions), m_DebugInfo);
+ auto *dexpr = new DictExpression(std::move(m_Expressions), m_DebugInfo);
dexpr->MakeInline();
exprs.emplace_back(dexpr);
void icinga::BindToScope(std::unique_ptr<Expression>& expr, ScopeSpecifier scopeSpec)
{
- DictExpression *dexpr = dynamic_cast<DictExpression *>(expr.get());
+ auto *dexpr = dynamic_cast<DictExpression *>(expr.get());
if (dexpr) {
for (auto& expr : dexpr->m_Expressions)
return;
}
- SetExpression *aexpr = dynamic_cast<SetExpression *>(expr.get());
+ auto *aexpr = dynamic_cast<SetExpression *>(expr.get());
if (aexpr) {
BindToScope(aexpr->m_Operand1, scopeSpec);
return;
}
- IndexerExpression *iexpr = dynamic_cast<IndexerExpression *>(expr.get());
+ auto *iexpr = dynamic_cast<IndexerExpression *>(expr.get());
if (iexpr) {
BindToScope(iexpr->m_Operand1, scopeSpec);
return;
}
- LiteralExpression *lexpr = dynamic_cast<LiteralExpression *>(expr.get());
+ auto *lexpr = dynamic_cast<LiteralExpression *>(expr.get());
if (lexpr && lexpr->GetValue().IsString()) {
std::unique_ptr<Expression> scope{new GetScopeExpression(scopeSpec)};
expr.reset(new IndexerExpression(std::move(scope), std::move(expr), lexpr->GetDebugInfo()));
}
- VariableExpression *vexpr = dynamic_cast<VariableExpression *>(expr.get());
+ auto *vexpr = dynamic_cast<VariableExpression *>(expr.get());
if (vexpr) {
std::unique_ptr<Expression> scope{new GetScopeExpression(scopeSpec)};
String checkName = name;
if (!abstract) {
- NameComposer *nc = dynamic_cast<NameComposer *>(type.get());
+ auto *nc = dynamic_cast<NameComposer *>(type.get());
if (nc)
checkName = nc->MakeName(name, nullptr);
void DbConnection::CleanUpHandler()
{
- long now = static_cast<long>(Utility::GetTime());
+ auto now = static_cast<long>(Utility::GetTime());
struct {
String name;
void DbConnection::UpdateAllObjects()
{
for (const Type::Ptr& type : Type::GetAllTypes()) {
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
if (!dtype)
continue;
return;
}
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
VERIFY(dtype);
DbConnection::Ptr conn = static_pointer_cast<DbConnection>(dtype->GetObject(idoName));
String utf8s = Utility::ValidateUTF8(s);
size_t length = utf8s.GetLength();
- char *to = new char[utf8s.GetLength() * 2 + 1];
+ auto *to = new char[utf8s.GetLength() * 2 + 1];
m_Mysql->real_escape_string(&m_Connection, to, utf8s.CStr(), length);
} else if (DbValue::IsTimestampNow(value)) {
*result = "NOW()";
} else if (DbValue::IsObjectInsertID(value)) {
- long id = static_cast<long>(rawvalue);
+ auto id = static_cast<long>(rawvalue);
if (id <= 0)
return false;
String utf8s = Utility::ValidateUTF8(s);
size_t length = utf8s.GetLength();
- char *to = new char[utf8s.GetLength() * 2 + 1];
+ auto *to = new char[utf8s.GetLength() * 2 + 1];
m_Pgsql->escapeStringConn(m_Connection, to, utf8s.CStr(), length, nullptr);
} else if (DbValue::IsTimestampNow(value)) {
*result = "NOW()";
} else if (DbValue::IsObjectInsertID(value)) {
- long id = static_cast<long>(rawvalue);
+ auto id = static_cast<long>(rawvalue);
if (id <= 0)
return false;
}
/* implicit dependency on host if this is a service */
- const Service *service = dynamic_cast<const Service *>(this);
+ const auto *service = dynamic_cast<const Service *>(this);
if (service && (dt == DependencyState || dt == DependencyNotification)) {
Host::Ptr host = service->GetHost();
boost::mutex::scoped_lock lock(m_CheckableMutex);
Array::Ptr groups;
- Host *host = dynamic_cast<Host *>(this);
+ auto *host = dynamic_cast<Host *>(this);
if (host)
groups = host->GetGroups();
AcknowledgementType Checkable::GetAcknowledgement()
{
- AcknowledgementType avalue = static_cast<AcknowledgementType>(GetAcknowledgementRaw());
+ auto avalue = static_cast<AcknowledgementType>(GetAcknowledgementRaw());
if (avalue != AcknowledgementNone) {
double expiry = GetAcknowledgementExpiry();
}
}
- MacroResolver *mresolver = dynamic_cast<MacroResolver *>(resolver.second.get());
+ auto *mresolver = dynamic_cast<MacroResolver *>(resolver.second.get());
if (mresolver && mresolver->ResolveMacro(boost::algorithm::join(tokens, "."), cr, result))
return true;
Value StatusTable::HostChecksAccessor(const Value&)
{
- long timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
+ auto timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
return CIB::GetActiveHostChecksStatistics(timespan);
}
Value StatusTable::HostChecksRateAccessor(const Value&)
{
- long timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
+ auto timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
return (CIB::GetActiveHostChecksStatistics(timespan) / (Utility::GetTime() - Application::GetStartTime()));
}
Value StatusTable::ServiceChecksAccessor(const Value&)
{
- long timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
+ auto timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
return CIB::GetActiveServiceChecksStatistics(timespan);
}
Value StatusTable::ServiceChecksRateAccessor(const Value&)
{
- long timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
+ auto timespan = static_cast<long>(Utility::GetTime() - Application::GetStartTime());
return (CIB::GetActiveServiceChecksStatistics(timespan) / (Utility::GetTime() - Application::GetStartTime()));
}
{
NotificationCommand::Ptr commandObj = notification->GetCommand();
- NotificationType type = static_cast<NotificationType>(itype);
+ auto type = static_cast<NotificationType>(itype);
Checkable::Ptr checkable = notification->GetCheckable();
* https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html
* https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html
*/
- int milliSeconds = static_cast<int>((ts - static_cast<int>(ts)) * 1000);
+ auto milliSeconds = static_cast<int>((ts - static_cast<int>(ts)) * 1000);
return Utility::FormatDateTime("%Y-%m-%dT%H:%M:%S", ts) + "." + Convert::ToString(milliSeconds) + Utility::FormatDateTime("%z", ts);
}
double objVersion = params->Get("version");
Type::Ptr ptype = Type::GetByName(objType);
- ConfigType *ctype = dynamic_cast<ConfigType *>(ptype.get());
+ auto *ctype = dynamic_cast<ConfigType *>(ptype.get());
if (!ctype) {
Log(LogCritical, "ApiListener")
/* delete the object */
Type::Ptr ptype = Type::GetByName(params->Get("type"));
- ConfigType *ctype = dynamic_cast<ConfigType *>(ptype.get());
+ auto *ctype = dynamic_cast<ConfigType *>(ptype.get());
if (!ctype) {
Log(LogCritical, "ApiListener")
<< "Syncing runtime objects to endpoint '" << endpoint->GetName() << "'.";
for (const Type::Ptr& type : Type::GetAllTypes()) {
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
if (!dtype)
continue;
Utility::MkDirP(Utility::DirName(path), 0750);
- std::fstream *fp = new std::fstream(path.CStr(), std::fstream::out | std::ofstream::app);
+ auto *fp = new std::fstream(path.CStr(), std::fstream::out | std::ofstream::app);
if (!fp->good()) {
Log(LogWarning, "ApiListener")
Log(LogNotice, "ApiListener")
<< "Replaying log: " << path;
- std::fstream *fp = new std::fstream(path.CStr(), std::fstream::in | std::fstream::binary);
+ auto *fp = new std::fstream(path.CStr(), std::fstream::in | std::fstream::binary);
StdioStream::Ptr logStream = new StdioStream(fp, true);
String message;
}
for (const Type::Ptr& type : Type::GetAllTypes()) {
- ConfigType *dtype = dynamic_cast<ConfigType *>(type.get());
+ auto *dtype = dynamic_cast<ConfigType *>(type.get());
if (!dtype)
continue;
String ConfigObjectUtility::CreateObjectConfig(const Type::Ptr& type, const String& fullName,
bool ignoreOnError, const Array::Ptr& templates, const Dictionary::Ptr& attrs)
{
- NameComposer *nc = dynamic_cast<NameComposer *>(type.get());
+ auto *nc = dynamic_cast<NameComposer *>(type.get());
Dictionary::Ptr nameParts;
String name;
return true;
}
- ConfigType *ctype = dynamic_cast<ConfigType *>(type.get());
+ auto *ctype = dynamic_cast<ConfigType *>(type.get());
ConfigObject::Ptr obj = ctype->GetObject(name);
result1->Set("code", 200);
void ConfigObjectTargetProvider::FindTargets(const String& type, const std::function<void (const Value&)>& addTarget) const
{
Type::Ptr ptype = Type::GetByName(type);
- ConfigType *ctype = dynamic_cast<ConfigType *>(ptype.get());
+ auto *ctype = dynamic_cast<ConfigType *>(ptype.get());
if (ctype) {
for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
{
ObjectLock olock(array);
- Array::Iterator it = array->Begin();
+ auto it = array->Begin();
array->Remove(it);
}
{
ObjectLock olock(dictionary);
- Dictionary::Iterator it = dictionary->Begin();
+ auto it = dictionary->Begin();
dictionary->Remove(it);
}
collisions = 0;
for (const Field& field : klass.Fields) {
- int hash = static_cast<int>(SDBM(field.Name, hlen));
+ auto hash = static_cast<int>(SDBM(field.Name, hlen));
jumptable[hash].push_back(std::make_pair(num, field.Name));
num++;
if (field.Type.IsName || !field.TrackAccessor.empty()) {
if (field.Name != "active") {
- m_Impl << "\t" << "ConfigObject *dobj = dynamic_cast<ConfigObject *>(this);" << std::endl
+ m_Impl << "\t" << "auto *dobj = dynamic_cast<ConfigObject *>(this);" << std::endl
<< "\t" << "if (!dobj || dobj->IsActive())" << std::endl
<< "\t";
}
<< "{" << std::endl;
if (field.Name != "active") {
- m_Impl << "\t" << "ConfigObject *dobj = dynamic_cast<ConfigObject *>(this);" << std::endl
+ m_Impl << "\t" << "auto *dobj = dynamic_cast<ConfigObject *>(this);" << std::endl
<< "\t" << "if (!dobj || dobj->IsActive())" << std::endl
<< "\t";
}