8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Ugly fix for CORE-4066, but looks like here g++ is too strong in type correctness.

This commit is contained in:
alexpeshkoff 2013-03-18 10:50:37 +00:00
parent 08824b1110
commit a2dd7e211f
2 changed files with 12 additions and 2 deletions

View File

@ -111,11 +111,21 @@ public:
return ptr;
}
Where* get()
{
return ptr;
}
operator const Where*() const
{
return ptr;
}
const Where* get() const
{
return ptr;
}
bool operator !() const
{
return !ptr;

View File

@ -1112,7 +1112,7 @@ void EXE_execute_triggers(thread_db* tdbb,
if (trigger->req_rpb.getCount() > 0)
{
trigger->req_rpb[0].rpb_record = old_rec ? old_rec : null_rec;
trigger->req_rpb[0].rpb_record = old_rec ? old_rec : null_rec.get();
if (old_rec && trigger_action != jrd_req::req_trigger_insert)
{
@ -1124,7 +1124,7 @@ void EXE_execute_triggers(thread_db* tdbb,
}
if (trigger->req_rpb.getCount() > 1)
trigger->req_rpb[1].rpb_record = new_rec ? new_rec : null_rec;
trigger->req_rpb[1].rpb_record = new_rec ? new_rec : null_rec.get();
if (new_rec && !(which_trig == StmtNode::PRE_TRIG &&
trigger_action == jrd_req::req_trigger_insert))