win32 port : warnings removed
This commit is contained in:
1 parent
74239303b3
commit
279b73a477
3 files changed
+8
-3
No files matched your search
@@ -130,7 +130,7 @@ void PVUnion::set(int32 index, PVFieldPtr const & value)
|
||||
|
||||
void PVUnion::set(String const & fieldName, PVFieldPtr const & value)
|
||||
{
|
||||
int32 index = variant ? -1 : unionPtr->getFieldIndex(fieldName);
|
||||
int32 index = variant ? -1 : static_cast<int32>(unionPtr->getFieldIndex(fieldName));
|
||||
if (index == -1)
|
||||
throw std::invalid_argument("no such fieldName");
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
#define EPICSEXCEPTION_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable: 4251)
|
||||
#pragma warning( push )
|
||||
#pragma warning(disable: 4275) // warning C4275: non dll-interface class used as base for dll-interface class (std::logic_error)
|
||||
#endif
|
||||
|
||||
#include <stdexcept>
|
||||
@@ -214,6 +215,10 @@ private:
|
||||
mutable std::string base_msg;
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#define THROW_BASE_EXCEPTION(msg) THROW_EXCEPTION2(::epics::pvData::BaseException, msg)
|
||||
#define THROW_BASE_EXCEPTION_CAUSE(msg, cause) THROW_EXCEPTION2(::epics::pvData::BaseException, msg)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ static void printOffsets(PVStructurePtr pvStructure)
|
||||
(long unsigned)pvStructure->getNextFieldOffset(),
|
||||
(long unsigned)pvStructure->getNumberFields());
|
||||
PVFieldPtrArray fields = pvStructure->getPVFields();
|
||||
int number = pvStructure->getStructure()->getNumberFields();
|
||||
int number = (int)pvStructure->getStructure()->getNumberFields();
|
||||
for(int i=0; i<number; i++) {
|
||||
PVFieldPtr pvField = fields[i];
|
||||
if(pvField->getField()->getType()==structure) {
|
||||
|
||||
Reference in new issue
Block a user