summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-10-17 06:02:38 +0200
committerClifford Wolf <clifford@clifford.at>2014-10-17 06:02:38 +0200
commit34caeeb4f3e21d8da3b75682e48ab85c27021b82 (patch)
tree4515ce4d39e8b9ad0c22865ab682714616f246d0
parent18cb8b4636933cb5a1ad3040f061d53345d1aa1d (diff)
Fixed a few VS warnings
-rw-r--r--kernel/log.h2
-rw-r--r--kernel/rtlil.h2
-rw-r--r--kernel/satgen.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/kernel/log.h b/kernel/log.h
index 421c50d3..10250cb9 100644
--- a/kernel/log.h
+++ b/kernel/log.h
@@ -181,7 +181,7 @@ struct PerformanceTimer
}
float sec() const {
- return total_ns * 1e-9;
+ return total_ns * 1e-9f;
}
#else
static int64_t query() { return 0; }
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index 5629c865..8a4d348b 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -898,7 +898,7 @@ struct RTLIL::SigBit
SigBit() : wire(NULL), data(RTLIL::State::S0) { }
SigBit(RTLIL::State bit) : wire(NULL), data(bit) { }
SigBit(RTLIL::Wire *wire) : wire(wire), offset(0) { log_assert(wire && wire->width == 1); }
- SigBit(RTLIL::Wire *wire, int offset) : wire(wire), offset(offset) { log_assert(wire); }
+ SigBit(RTLIL::Wire *wire, int offset) : wire(wire), offset(offset) { log_assert(wire != nullptr); }
SigBit(const RTLIL::SigChunk &chunk) : wire(chunk.wire) { log_assert(chunk.width == 1); if (wire) offset = chunk.offset; else data = chunk.data[0]; }
SigBit(const RTLIL::SigChunk &chunk, int index) : wire(chunk.wire) { if (wire) offset = chunk.offset + index; else data = chunk.data[index]; }
SigBit(const RTLIL::SigSpec &sig);
diff --git a/kernel/satgen.h b/kernel/satgen.h
index d556f4f3..2c69663c 100644
--- a/kernel/satgen.h
+++ b/kernel/satgen.h
@@ -107,7 +107,7 @@ struct SatGen
{
log_assert(timestep != 0);
std::string pf = prefix + (timestep == -1 ? "" : stringf("@%d:", timestep));
- return imported_signals[pf].count(bit);
+ return imported_signals[pf].count(bit) != 0;
}
void getAsserts(RTLIL::SigSpec &sig_a, RTLIL::SigSpec &sig_en, int timestep = -1)