DRS4 Forum
  DRS4 Discussion Forum  Not logged in ELOG logo
Entry  Thu May 21 07:38:05 2020, Keita Mizukoshi, Type check at DOFrame.h in official software 
    Reply  Fri May 22 13:24:51 2020, Stefan Ritt, Type check at DOFrame.h in official software 
Message ID: 788     Entry time: Fri May 22 13:24:51 2020     In reply to: 785
Author: Stefan Ritt 
Subject: Type check at DOFrame.h in official software 

The software is a bit outdated, I will soon make a new release. 

In meantime, you can replace that like with

bool GetRefclk(int board) { return m_refClk[board]; }

Best,
Stefan 

Keita Mizukoshi wrote:

Hi,

 

I've failured to compile official software. The cause is the following line.

DOFrame.h L.111    bool GetRefclk()        { return m_refClk > 0; }

 

m_refClk is pointer to bool. I guess these line is for null-check of the pointer.

Can I replace the following line as 

bool GetRefclk()        { return m_refClk != nullptr; }

?

The latest compilers may not accept C-style check.

 

My compiler version is

Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Best regards,

Keita

 

ELOG V3.1.5-fe60aaf