Commit 75dce4dd authored by phenigma's avatar phenigma

Merge branch 'bionic'

parents d7c7022c 8e51f961
Pipeline #693 failed with stage
in 6 seconds
......@@ -37,7 +37,6 @@ namespace DCE
void ServerThread();
char* m_argv[];
char* m_cPortStr;
char* m_cMacAddress;
......@@ -83,6 +82,7 @@ namespace DCE
AirTunesPipe *pipe;
};
char* m_argv[];
};
}
......
......@@ -257,7 +257,7 @@ char *BDCommandProcessor_Linux_Bluetooth::ReceiveData(int size)
{
LoggerWrapper::GetInstance()->Write(LV_WARNING,"ReceiveData (BD connection): have to quit!");
m_bRunning = false;
return false;
return 0; // false;
}
FD_ZERO(&wrfds);
......
......@@ -2622,7 +2622,7 @@ list<pair<string, string> > General_Info_Plugin::GetUserBookmarks(string sPK_Use
if( Bookmarks.size()==0 )
{
Bookmarks.push_back(make_pair<string,string> ("http://dcerouter/lmce-admin","LinuxMCE Admin"));
Bookmarks.push_back(make_pair ("http://dcerouter/lmce-admin","LinuxMCE Admin"));
//Bookmarks.push_back(make_pair<string,string> ("http://dcerouter/support","Pluto Support"));
}
......
......@@ -68,7 +68,7 @@ IRBase::handleStart(Command_Impl *pCommand_Impl) {
irDevice.SerializeRead(iSize, pData); // De-serialize the data
LoggerWrapper::GetInstance()->Write(LV_STATUS, "IR Code count: %d", mapClass.size());
m_mapDevice_IRRepeat[devid] = make_pair<int,int> (irDevice.m_iRepeatIR,irDevice.m_iRepeatVolume);
m_mapDevice_IRRepeat[devid] = make_pair (irDevice.m_iRepeatIR,irDevice.m_iRepeatVolume);
for(map<int,string>::iterator it = irDevice.m_mapCodes.begin(); it != irDevice.m_mapCodes.end(); it++ ) {
long cmdid = (*it).first;
......
......@@ -40,12 +40,15 @@ Gen_Dev_Files +=
sources += ../LIRC_DCE/IRReceiverBase.cpp ../VFD_LCD/VFD_LCD_Base.cpp ../VFD_LCD/CoreMenuStructure.cpp ../VFD_LCD/MenuNode.cpp
Csources += fileio.c linuxserio.c lowlevel.c server.c errormessage.c flashrom.c webserver.c xap.c
ifneq (,$(findstring amd64, $(arch)))
ifneq (,$(findstring amd64, $(shell arch)))
ccf-o = ccf-amd64.o
else
ifneq (,$(findstring x86_64, $(shell arch)))
ccf-o = ccf-amd64.o
else
ccf-o = ccf-i386.o
endif
endif
#<-dceag-mf-b->!
LDLIBS = $(XTRALDLIBS) $(BASELDLIBS)
......@@ -60,13 +63,13 @@ bin: IRTrans
so: IRTrans.so
IRTrans.so: $(sources:.cpp=.o) $(Csources:.c=.o) $(ccf-o)
$(CXX) -shared -o $(MYNAME).so $(call cpath,$+) $(LDFLAGS) $(LDLIBS)
$(CXX) -shared -o $(MYNAME).so $(call cpath,$+) $(LDFLAGS) $(LDLIBS) $(CXXFLAGS)
cp $@ ../bin
chmod +x post_make.sh
./post_make.sh $@
IRTrans: $(sources:.cpp=.o) $(Csources:.c=.o) $(ccf-o)
$(CXX) -o $(MYNAME) $(call cpath,$+) $(LDFLAGS) $(LDLIBS)
$(CXX) -o $(MYNAME) $(call cpath,$+) $(LDFLAGS) $(LDLIBS) $(CXXFLAGS)
cp $@ ../bin
./post_make.sh $@
......
......@@ -115,11 +115,7 @@ void IRReceiverBase::GetConfig(DeviceData_Impl *pData)
m_mapKeyMapping[StringUtils::ToUpper(sToken)] = pMapKeysToMessages;
}
#ifdef WIN32
(*pMapKeysToMessages)[make_pair (cRemoteLayout, cScreenType)] = pMessage;
#else
(*pMapKeysToMessages)[ make_pair<char,char> (cRemoteLayout,cScreenType) ] = pMessage;
#endif
}
if( posSlash<=pos )
break; // We already parsed the last one
......@@ -180,35 +176,19 @@ void IRReceiverBase::ReceivedCode(int PK_Device_Remote,const char *pCode,const c
{
MapKeysToMessages *pMapKeysToMessages = it->second;
MapKeysToMessages::iterator itMessage;
#ifdef WIN32
itMessage = pMapKeysToMessages->find(make_pair (cRemoteLayout, m_cCurrentScreen));
#else
itMessage = pMapKeysToMessages->find(make_pair<char,char> (cRemoteLayout,m_cCurrentScreen) );
#endif
if (itMessage == pMapKeysToMessages->end())
{
#ifdef WIN32
itMessage = pMapKeysToMessages->find(make_pair (cRemoteLayout, 0));
#else
itMessage = pMapKeysToMessages->find(make_pair<char, char>(cRemoteLayout, 0));
#endif
}
if (itMessage == pMapKeysToMessages->end())
{
#ifdef WIN32
itMessage = pMapKeysToMessages->find(make_pair (0, m_cCurrentScreen));
#else
itMessage = pMapKeysToMessages->find(make_pair<char, char>(0, m_cCurrentScreen));
#endif
}
if (itMessage == pMapKeysToMessages->end())
{
#ifdef WIN32
itMessage = pMapKeysToMessages->find(make_pair (0, 0));
#else
itMessage = pMapKeysToMessages->find(make_pair<char, char>(0, 0));
#endif
}
if( itMessage!=pMapKeysToMessages->end() )
......
......@@ -306,7 +306,7 @@ bool Lighting_Plugin::GetVideoFrame( class Socket *pSocket, class Message *pMess
if( sState.empty()==false )
{
m_mapLightsToRestore[ pDevice_Light->m_dwPK_Device ] = make_pair<time_t,string> ( time(NULL)+m_iCameraTimeout, sState );
m_mapLightsToRestore[ pDevice_Light->m_dwPK_Device ] = make_pair ( time(NULL)+m_iCameraTimeout, sState );
m_mapLightsToRestoreEvents[ pDevice_Light->m_dwPK_Device ] = true;
}
DCE::CMD_On CMD_On(m_dwPK_Device,pDevice_Light->m_dwPK_Device,0,"");
......
......@@ -106,7 +106,7 @@ namespace DCE
List_MediaHandlerInfo *m_mapMediaHandlerInfo_MediaType_Find(int PK_MediaType,int PK_MediaProvider)
{
map< pair<int,int>,List_MediaHandlerInfo *>::iterator it = m_mapMediaHandlerInfo_MediaType.find( make_pair<int,int> (PK_MediaType,PK_MediaProvider) );
map< pair<int,int>,List_MediaHandlerInfo *>::iterator it = m_mapMediaHandlerInfo_MediaType.find( make_pair (PK_MediaType,PK_MediaProvider) );
return it==m_mapMediaHandlerInfo_MediaType.end() ? NULL : (*it).second;
}
......
......@@ -795,7 +795,7 @@ int MediaAttributes_LowLevel::Parse_Misc_Media_ID(int PK_MediaType,listMediaAttr
if( PK_AttributeType==ATTRIBUTETYPE_Album_CONST )
{
mapAlbum[ make_pair<int,int> (Track,Section) ] = sName;
mapAlbum[ make_pair (Track,Section) ] = sName;
continue;
}
......@@ -807,7 +807,7 @@ int MediaAttributes_LowLevel::Parse_Misc_Media_ID(int PK_MediaType,listMediaAttr
}
if( PK_AttributeType==ATTRIBUTETYPE_Performer_CONST )
mapPerformer[ make_pair<int,int> (Track,Section) ] = pRow_Attribute->PK_Attribute_get();
mapPerformer[ make_pair (Track,Section) ] = pRow_Attribute->PK_Attribute_get();
LoggerWrapper::GetInstance()->Write(LV_STATUS,"MediaAttributes_LowLevel::Parse_Misc_Media_ID added attribute %p %d %s",
pRow_Attribute, (pRow_Attribute ? pRow_Attribute->PK_Attribute_get() : 0), sName.c_str());
......
......@@ -126,7 +126,7 @@ MediaHandlerInfo::MediaHandlerInfo( class MediaHandlerBase *pMediaHandlerBase, c
if( !pList_MediaHandlerInfo )
{
pList_MediaHandlerInfo = new List_MediaHandlerInfo( );
pEntertainArea->m_mapMediaHandlerInfo_MediaType[make_pair<int,int> (m_PK_MediaType,pMediaDevice->m_iPK_MediaProvider) ] = pList_MediaHandlerInfo;
pEntertainArea->m_mapMediaHandlerInfo_MediaType[make_pair (m_PK_MediaType,pMediaDevice->m_iPK_MediaProvider) ] = pList_MediaHandlerInfo;
}
pList_MediaHandlerInfo->push_back( this );
......
This diff is collapsed.
......@@ -336,14 +336,14 @@ protected:
// The first 2 maps will see if the user directly specified a remote control to use for the given remote
map< pair<int,pair<int,int> >, class RemoteControlSet *>::iterator it1;
pair<int,pair<int,int> > p1 = make_pair< int,pair<int,int> > (
pair<int,pair<int,int> > p1 = make_pair (
PK_Orbiter,
make_pair< int,int > ( iPK_DeviceTemplate, PK_MediaType ) );
make_pair ( iPK_DeviceTemplate, PK_MediaType ) );
if( (it1=m_mapOrbiter_DeviceTemplate_MediaType_RemoteControl[UIVersion-1].find(p1))!=m_mapOrbiter_DeviceTemplate_MediaType_RemoteControl[UIVersion-1].end() )
return it1->second;
map< pair<int,int>, class RemoteControlSet *>::iterator it2;
pair<int,int> p2 = make_pair< int,int > (
pair<int,int> p2 = make_pair (
PK_Orbiter,
PK_MediaType );
if( (it2=m_mapOrbiter_MediaType_RemoteControl[UIVersion-1].find(p2))!=m_mapOrbiter_MediaType_RemoteControl[UIVersion-1].end() )
......@@ -352,7 +352,7 @@ protected:
// Next if a remote is specified for this particular type of media device
map< pair<int,int>, class RemoteControlSet *>::iterator it3;
pair<int,int> p3 = make_pair< int,int > (
pair<int,int> p3 = make_pair (
iPK_DeviceTemplate,
PK_MediaType );
......
......@@ -146,7 +146,7 @@ class DataGridTable *Media_Plugin::MediaBrowser( string GridID, string Parms, vo
cout << "XXX After MediaListGrid Initialize" << endl;
bool bIdentifiesFile = true;
if( PK_AttributeType_Sort>0 )
if( m_mapMediaType_AttributeType_Identifier.find( make_pair<int,int> ( PK_MediaType,PK_AttributeType_Sort ) )==m_mapMediaType_AttributeType_Identifier.end() )
if( m_mapMediaType_AttributeType_Identifier.find( make_pair ( PK_MediaType,PK_AttributeType_Sort ) )==m_mapMediaType_AttributeType_Identifier.end() )
bIdentifiesFile = false; // This combination doesn't identify an individual file to play (like a song), it identifies a group of attributes (like an album or performer)
if( PK_MediaType==MEDIATYPE_misc_Playlist_CONST )
......@@ -1119,7 +1119,7 @@ class DataGridTable *Media_Plugin::CurrentMediaSections( string GridID, string P
pDataGrid->SetData(0, currentPos++,new DataGridCell(sCell,sValue));
if( (int)sTitle==pMediaStream->m_iDequeMediaTitle_Pos && (int)sSection==pMediaStream->m_iDequeMediaSection_Pos )
*sValue_To_Assign=sValue;
mapSections[ make_pair<int,int> (sSection,sTitle) ] = true;
mapSections[ make_pair (sSection,sTitle) ] = true;
}
}
}
......@@ -1153,7 +1153,7 @@ class DataGridTable *Media_Plugin::CurrentMediaSections( string GridID, string P
}
LoggerWrapper::GetInstance()->Write(LV_STATUS, "Returning data: (%d) -> %s section %d", itFiles - pMediaStream->m_dequeMediaFile.begin(), ((*itFiles)->m_sFilename).c_str(),iSection);
mapSections[ make_pair<int,int> (iSection,0) ] = true;
mapSections[ make_pair (iSection,0) ] = true;
}
*sValue_To_Assign=StringUtils::itos(pMediaStream->m_iDequeMediaFile_Pos);
}
......@@ -1166,7 +1166,7 @@ class DataGridTable *Media_Plugin::CurrentMediaSections( string GridID, string P
{
for(map< pair<int,int>,string >::iterator it = pMediaStream->m_mapSections.begin(); it!=pMediaStream->m_mapSections.end(); ++it)
{
itSections = mapSections.find( make_pair<int,int> ( it->first.first, it->first.second ) );
itSections = mapSections.find( make_pair ( it->first.first, it->first.second ) );
if( itSections==mapSections.end() )
{
if( pMediaStream->m_bContainsTitlesOrSections ) // There's a title
......
......@@ -1653,17 +1653,17 @@ void MythTV_PlugIn::CMD_Schedule_Recording(string sType,string sOptions,string s
if( sType=="1" )
{
m_mapScheduledRecordings[mythRecording.key()] =
make_pair<char,int> ('O',iID);
make_pair ('O',iID);
}
else if( sType=="3")
{
m_mapScheduledRecordings[mythRecording.key()] =
make_pair<char,int> ('C',iID);
make_pair ('C',iID);
}
else
{
m_mapScheduledRecordings[mythRecording.key()] =
make_pair<char,int>(sType[0],iID);
make_pair (sType[0],iID);
}
LoggerWrapper::GetInstance()->Write(LV_STATUS, "MythTV_PlugIn::CMD_Schedule_Recording key " UINT64_PRINTF " %d=%s m_mapScheduledRecordings size %d",
......@@ -3612,12 +3612,12 @@ void MythTV_PlugIn::UpdateUpcomingRecordings()
if (sRecType == "1")
{
m_mapScheduledRecordings[mythRecording.key()] =
make_pair<char,int> ('O',atoi(sRecordID.c_str()));
make_pair ('O',atoi(sRecordID.c_str()));
}
else if (sRecType == "3")
{
m_mapScheduledRecordings[mythRecording.key()] =
make_pair<char,int> ('C',atoi(sRecordID.c_str()));;
make_pair ('C',atoi(sRecordID.c_str()));;
}
LoggerWrapper::GetInstance()->Write(
......
......@@ -120,11 +120,7 @@ DataGridRenderer::DataGridRenderer(DesignObj_Orbiter *pOwner): ObjectRenderer(pO
if( bContainsCells && DGRow!=pDataGridTable->m_iUpRow && DGRow!=pDataGridTable->m_iDownRow)
{
map< pair<int,int>, DesignObj_Orbiter *>::iterator it =
#ifdef WIN32
m_pObj_Owner_DataGrid->m_mapChildDgObjects.find(make_pair (j, i));
#else
m_pObj_Owner_DataGrid->m_mapChildDgObjects.find(make_pair<int,int> (j, i));
#endif
if( it!=m_pObj_Owner_DataGrid->m_mapChildDgObjects.end())
{
......@@ -189,11 +185,7 @@ DataGridRenderer::DataGridRenderer(DesignObj_Orbiter *pOwner): ObjectRenderer(pO
return;
}
#ifdef WIN32
map< pair<int, int>, DesignObj_Orbiter *>::iterator it = m_pObj_Owner_DataGrid->m_mapChildDgObjects.find(make_pair (Column, Row));
#else
map< pair<int,int>, DesignObj_Orbiter *>::iterator it=m_pObj_Owner_DataGrid->m_mapChildDgObjects.find( make_pair<int,int> (Column,Row) );
#endif
if( it!=m_pObj_Owner_DataGrid->m_mapChildDgObjects.end() )
{
DesignObj_Orbiter *pObj = it->second;
......
......@@ -518,11 +518,7 @@ bool DesignObj_Data::Serialize( bool bWriting, char *&pcDataBlock, unsigned long
long Row = Read_long();
string sObjectID;
Read_string(sObjectID);
#ifdef WIN32
mapDgObjects[sObjectID] = make_pair (Col, Row);
#else
mapDgObjects[sObjectID] = make_pair<int,int> (Col,Row);
#endif
}
}
......@@ -554,11 +550,7 @@ bool DesignObj_Data::Serialize( bool bWriting, char *&pcDataBlock, unsigned long
pDesignObj_Data->m_pDesignObj_DataGrid = ( (DesignObj_DataGrid *)this );
pDesignObj_Data->m_iGridCol=it->second.first;
pDesignObj_Data->m_iGridRow=it->second.second;
#ifdef WIN32
pDesignObj_Data->m_pDesignObj_DataGrid->m_mapChildDgObjects[make_pair (it->second.first, it->second.second)] = pDesignObj_Data;
#else
pDesignObj_Data->m_pDesignObj_DataGrid->m_mapChildDgObjects[ make_pair<int,int> (it->second.first,it->second.second) ] = pDesignObj_Data;
#endif
}
}
#elif defined(OrbiterGen)
......@@ -568,7 +560,7 @@ bool DesignObj_Data::Serialize( bool bWriting, char *&pcDataBlock, unsigned long
map<string, pair<int,int> >::iterator it=mapDgObjects.find( pDesignObj_Data->m_ObjectID );
if( it!=mapDgObjects.end() )
{
((DesignObj_Generator *) this)->m_mapChildDgObjects[ make_pair<int,int> (it->second.first,it->second.second) ] = pDesignObj_Data;
((DesignObj_Generator *) this)->m_mapChildDgObjects[ make_pair (it->second.first,it->second.second) ] = pDesignObj_Data;
}
}
#endif
......
......@@ -219,11 +219,7 @@ g_PlutoProfiler->Stop("send command");
}
else
{
#ifdef WIN32
m_pOrbiter->Renderer()->BackgroundImageLoad(pPath, this, m_pOrbiter->m_dwIDataGridRequestCounter, make_pair (GridCurRow, GridCurCol), pCell, pDataGridTable->CovertColRowType(it->first), !bCache);
#else
m_pOrbiter->Renderer()->BackgroundImageLoad(pPath, this, m_pOrbiter->m_dwIDataGridRequestCounter, make_pair<int, int>(GridCurRow, GridCurCol), pCell, pDataGridTable->CovertColRowType(it->first), !bCache);
#endif // WIN32
}
}
}
......@@ -299,11 +295,7 @@ DataGridTable *DesignObj_DataGrid::DataGridTable_Get(int CurRow,int CurCol)
if( m_CachedCurRow!=CurRow || m_CachedCurCol!=CurCol )
{
#ifdef WIN32
map< pair<int, int>, DataGridTable *>::iterator it = m_mapDataGridTable_Cache.find(make_pair (CurRow, CurCol));
#else
map< pair<int,int>, DataGridTable *>::iterator it=m_mapDataGridTable_Cache.find( make_pair<int,int> (CurRow,CurCol) );
#endif
if( it==m_mapDataGridTable_Cache.end() )
return NULL;
else
......@@ -315,11 +307,7 @@ DataGridTable *DesignObj_DataGrid::DataGridTable_Get(int CurRow,int CurCol)
void DesignObj_DataGrid::DataGridTable_Set(DataGridTable *pDataGridTable,int CurRow,int CurCol)
{
PLUTO_SAFETY_LOCK( vm, m_pOrbiter->m_DatagridMutex );
#ifdef WIN32
map< pair<int, int>, DataGridTable *>::iterator it = m_mapDataGridTable_Cache.find(make_pair (CurRow, CurCol));
#else
map< pair<int,int>, DataGridTable *>::iterator it=m_mapDataGridTable_Cache.find( make_pair<int,int> (CurRow,CurCol) );
#endif
if( it!=m_mapDataGridTable_Cache.end() )
{
if( it->second && it->second!=pDataGridTable ) // The grids have been changed
......@@ -327,11 +315,7 @@ void DesignObj_DataGrid::DataGridTable_Set(DataGridTable *pDataGridTable,int Cur
else
return; // Nothing to do
}
#ifdef WIN32
m_mapDataGridTable_Cache[make_pair (CurRow, CurCol)] = pDataGridTable;
#else
m_mapDataGridTable_Cache[ make_pair<int,int> (CurRow,CurCol) ] = pDataGridTable;
#endif
if( CurRow==m_GridCurRow && CurCol==m_GridCurCol )
m_pDataGridTable_Current = pDataGridTable;
}
......@@ -368,41 +352,25 @@ void DesignObj_DataGrid::CacheGrid()
{
m_PagesCached.first=DIRECTION_Down_CONST;
m_PagesCached.second=0;
#ifdef WIN32
m_CurrentLocation = make_pair (m_GridCurRow, m_GridCurCol);
#else
m_CurrentLocation = make_pair<int,int> (m_GridCurRow,m_GridCurCol);
#endif
}
else if( m_PagesCached.first==DIRECTION_Down_CONST && m_PagesCached.second>=m_mapNumberOfPagesToCache[DIRECTION_Down_CONST] )
{
m_PagesCached.first=DIRECTION_Right_CONST;
m_PagesCached.second=0;
#ifdef WIN32
m_CurrentLocation = make_pair (m_GridCurRow, m_GridCurCol);
#else
m_CurrentLocation = make_pair<int,int> (m_GridCurRow,m_GridCurCol);
#endif
}
else if( m_PagesCached.first==DIRECTION_Right_CONST && m_PagesCached.second>=m_mapNumberOfPagesToCache[DIRECTION_Right_CONST] )
{
m_PagesCached.first=DIRECTION_Up_CONST;
m_PagesCached.second=0;
#ifdef WIN32
m_CurrentLocation = make_pair (m_GridCurRow, m_GridCurCol);
#else
m_CurrentLocation = make_pair<int,int> (m_GridCurRow,m_GridCurCol);
#endif
}
else if( m_PagesCached.first==DIRECTION_Up_CONST && m_PagesCached.second>=m_mapNumberOfPagesToCache[DIRECTION_Up_CONST] )
{
m_PagesCached.first=DIRECTION_Left_CONST;
m_PagesCached.second=0;
#ifdef WIN32
m_CurrentLocation = make_pair (m_GridCurRow, m_GridCurCol);
#else
m_CurrentLocation = make_pair<int,int> (m_GridCurRow,m_GridCurCol);
#endif
}
else if( m_PagesCached.first==DIRECTION_Left_CONST && m_PagesCached.second>=m_mapNumberOfPagesToCache[DIRECTION_Left_CONST] )
return; // We've finished caching in all directions
......
......@@ -775,11 +775,7 @@ bool Orbiter::GetConfig()
m_mapScanCodeToIgnoreOnYield[ScanCode]=true;
string sCode;
#ifdef WIN32
m_mapScanCodeToRemoteButton[make_pair (ScanCode, Action)] = StringUtils::ToUpper(it2->substr(0, pos));
#else
m_mapScanCodeToRemoteButton[ make_pair<int,char> (ScanCode,Action) ] = StringUtils::ToUpper(it2->substr(0,pos));
#endif // WIN32
LoggerWrapper::GetInstance()->Write(LV_STATUS, "Added scan code %d -> %s Action: %d",
atoi( it2->substr(pos + 1).c_str()), StringUtils::ToUpper(it2->substr(0,pos)).c_str(),(int) Action);
......@@ -805,11 +801,7 @@ bool Orbiter::GetConfig()
int EventType2 = atoi( it2->substr(posEq+1).c_str() );
int EventID2 = atoi( it2->substr(posComma2+1).c_str() );
#ifdef WIN32
m_mapEventToSubstitute[make_pair (EventType1, EventID1)] = make_pair (EventType2, EventID2);
#else
m_mapEventToSubstitute[ make_pair<int,int> (EventType1,EventID1) ] = make_pair<int,int> (EventType2,EventID2);
#endif
LoggerWrapper::GetInstance()->Write(LV_STATUS, "Added replacement %d,%d = %d,%d",EventType1,EventID1,EventType2,EventID2);
}
......@@ -2838,11 +2830,7 @@ void Orbiter::QueueEventForProcessing( void *eventData )
{
iButton = spEvent->data.region.m_iButton;
}
#ifdef WIN32
map< pair<int, int>, pair<int, int> >::iterator it = m_mapEventToSubstitute.find(make_pair (spEvent->type, iButton));
#else
map< pair<int,int>,pair<int,int> >::iterator it = m_mapEventToSubstitute.find( make_pair<int,int> (spEvent->type,iButton) );
#endif
if( it!=m_mapEventToSubstitute.end() )
{
spEvent->type = (DCE::Orbiter::Event::EventType) it->second.first;
......@@ -2896,20 +2884,12 @@ void Orbiter::QueueEventForProcessing( void *eventData )
if (tMilisecondsPassed > KEY_DOWN_DURATION)
{
#ifdef WIN32
it = m_mapScanCodeToRemoteButton.find(make_pair (spEvent->data.button.m_iKeycode, 'H'));
#else
it = m_mapScanCodeToRemoteButton.find(make_pair<int, char>(spEvent->data.button.m_iKeycode, 'H'));
#endif
}
if (it == m_mapScanCodeToRemoteButton.end()) // Either we didn't hold the button or there is no hold specific event
{
#ifdef WIN32
it = m_mapScanCodeToRemoteButton.find(make_pair (spEvent->data.button.m_iKeycode, 'U'));
#else
it = m_mapScanCodeToRemoteButton.find(make_pair<int, char>(spEvent->data.button.m_iKeycode, 'U'));
#endif
}
m_tButtonDown.tv_sec=0;
......@@ -2919,13 +2899,8 @@ void Orbiter::QueueEventForProcessing( void *eventData )
// the down, and the framework something else for the up
if( it == m_mapScanCodeToRemoteButton.end() )
{
#ifdef WIN32
if (m_mapScanCodeToRemoteButton.find(make_pair (spEvent->data.button.m_iKeycode, 'D')) != m_mapScanCodeToRemoteButton.end() ||
m_mapScanCodeToRemoteButton.find(make_pair (spEvent->data.button.m_iKeycode, 'R')) != m_mapScanCodeToRemoteButton.end())
#else
if( m_mapScanCodeToRemoteButton.find( make_pair<int,char> (spEvent->data.button.m_iKeycode, 'D'))!=m_mapScanCodeToRemoteButton.end() ||
m_mapScanCodeToRemoteButton.find( make_pair<int,char> (spEvent->data.button.m_iKeycode, 'R'))!=m_mapScanCodeToRemoteButton.end() )
#endif
{
#ifdef DEBUG
LoggerWrapper::GetInstance()->Write(LV_STATUS,"Orbiter::QueueEventForProcessing ignoring keycode %d up because there's a DOWN",spEvent->data.button.m_iKeycode);
......@@ -2940,17 +2915,9 @@ void Orbiter::QueueEventForProcessing( void *eventData )
#ifdef DEBUG
LoggerWrapper::GetInstance()->Write(LV_STATUS,"Orbiter::QueueEventForProcessing m_tButtonDown %d.%d",(int) m_tButtonDown.tv_sec,(int) m_tButtonDown.tv_nsec);
#endif
#ifdef WIN32
it = m_mapScanCodeToRemoteButton.find(make_pair (spEvent->data.button.m_iKeycode, 'D'));
#else
it = m_mapScanCodeToRemoteButton.find( make_pair<int,char> (spEvent->data.button.m_iKeycode, 'D') );
#endif
#ifdef WIN32
map< pair<int, char>, string>::iterator itRepeat = m_mapScanCodeToRemoteButton.find(make_pair (spEvent->data.button.m_iKeycode, 'R'));
#else
map< pair<int,char>, string>::iterator itRepeat = m_mapScanCodeToRemoteButton.find( make_pair<int,char> (spEvent->data.button.m_iKeycode, 'R'));
#endif
if( itRepeat!=m_mapScanCodeToRemoteButton.end() )
{
sRepeatKey = itRepeat->second; // This is the key to repeat
......@@ -2961,11 +2928,7 @@ void Orbiter::QueueEventForProcessing( void *eventData )
it = itRepeat;
}
if( it==m_mapScanCodeToRemoteButton.end() &&
#ifdef WIN32
m_mapScanCodeToRemoteButton.find(make_pair (spEvent->data.button.m_iKeycode, 'U')) != m_mapScanCodeToRemoteButton.end())
#else
m_mapScanCodeToRemoteButton.find( make_pair<int,char> (spEvent->data.button.m_iKeycode, 'U') )!=m_mapScanCodeToRemoteButton.end() )
#endif
{
#ifdef DEBUG
LoggerWrapper::GetInstance()->Write(LV_STATUS,"Orbiter::QueueEventForProcessing ignoring keycode %d down because there's an UP",spEvent->data.button.m_iKeycode);
......@@ -9408,11 +9371,7 @@ void Orbiter::CMD_Goto_Screen(string sID,int iPK_Screen,int iInterruption,bool b
{
if (bQueue)
{
#ifdef WIN32
m_listPendingGotoScreens.push_back(make_pair (iInterruption, new Message(pMessage)));
#else
m_listPendingGotoScreens.push_back(make_pair<int, Message *>(iInterruption, new Message(pMessage)));
#endif
}
return;
}
......
......@@ -1132,11 +1132,7 @@ void MediaFileBrowserOptions::SelectArrays(DesignObj_Orbiter *pObj,int PK_Array,
string sPK_Array = pDesignObj_Orbiter->GetVariableAssignment(VARIABLE_PK_Array_CONST);
if( PK_Array!=atoi(sPK_Array.c_str()) )
continue; // It's not this array
#ifdef WIN32
m_mapObjectsValues[make_pair (pDesignObj_Orbiter->m_iBaseObjectID, sArrayValue)] = pDesignObj_Orbiter;
#else
m_mapObjectsValues[ make_pair<int,string> (pDesignObj_Orbiter->m_iBaseObjectID,sArrayValue) ] = pDesignObj_Orbiter;
#endif
if( sArrayValue.size() && sArrayValue==sValues || StringUtils::StartsWith(sValues,sArrayValue + ",") ) // If it's the only one, or the first one
pDesignObj_Orbiter->m_GraphicToDisplay_set("sh0",GRAPHIC_SELECTED,false,true);
else if( sArrayValue.size()==0 || atoi(sArrayValue.c_str())==0 )
......@@ -1161,11 +1157,7 @@ void MediaFileBrowserOptions::SelectArrays(DesignObj_Orbiter *pObj,int PK_Array,
string sPK_Array = pDesignObj_Orbiter->GetVariableAssignment(VARIABLE_PK_Array_CONST);
if( PK_Array!=atoi(sPK_Array.c_str()) )
continue; // It's not this array
#ifdef WIN32
m_mapObjectsValues[make_pair (pDesignObj_Orbiter->m_iBaseObjectID, sArrayValue)] = pDesignObj_Orbiter;
#else
m_mapObjectsValues[ make_pair<int,string> (pDesignObj_Orbiter->m_iBaseObjectID,sArrayValue) ] = pDesignObj_Orbiter;
#endif // WIN32
if( atoi(sArrayValue.c_str())==iValue )
pDesignObj_Orbiter->m_GraphicToDisplay_set("sh4",GRAPHIC_SELECTED,false,true);
else
......@@ -1208,11 +1200,7 @@ void MediaFileBrowserOptions::SelectedArray(DesignObj_Orbiter *pObj,int PK_Array
if( bTreatZeroAsAll )
{
// Clear the 'all' unless the user selected all, in which case clear everything else
#ifdef WIN32
map< pair<int,string>, DesignObj_Orbiter * >::iterator it = m_mapObjectsValues.find( make_pair ( pObj->m_iBaseObjectID, "0" ) );
#else
map< pair<int,string>, DesignObj_Orbiter * >::iterator it = m_mapObjectsValues.find( make_pair<int,string> ( pObj->m_iBaseObjectID, "0" ) );
#endif
if( it != m_mapObjectsValues.end() )
{
DesignObj_Orbiter *pObj_All = it->second;
......@@ -1261,11 +1249,7 @@ void MediaFileBrowserOptions::SelectedArray(DesignObj_Orbiter *pObj,int PK_Array
return; // User just chose the same thing
// Find the old one if it's changed
#ifdef WIN32
map< pair<int, string>, DesignObj_Orbiter * >::iterator it = m_mapObjectsValues.find(make_pair (pObj->m_iBaseObjectID, StringUtils::itos(iValue)));
#else
map< pair<int,string>, DesignObj_Orbiter * >::iterator it= m_mapObjectsValues.find( make_pair<int,string> (pObj->m_iBaseObjectID,StringUtils::itos(iValue)) );
#endif // WIN32
if( it!=m_mapObjectsValues.end() )
{
DesignObj_Orbiter *pObj_PriorSelected = it->second;
......
......@@ -2599,7 +2599,7 @@ void DesignObj_Generator::AddDataGridObjects()
pDesignObj_Generator->m_bCanBeHidden=pDesignObj_Generator->m_bHideByDefault=true;
if( pDesignObj_Generator->m_pRow_DesignObjVariation ) // Be sure it's a valid object
{
m_mapChildDgObjects[ make_pair<int,int> (iCol,0) ] = pDesignObj_Generator; // m_mapChildDgObjects is col/row to object
m_mapChildDgObjects[ make_pair (iCol,0) ] = pDesignObj_Generator; // m_mapChildDgObjects is col/row to object
// Reduce this grid by the size of the up/down
m_alChildDesignObjs.push_back(pDesignObj_Generator);
}
......@@ -2621,7 +2621,7 @@ void DesignObj_Generator::AddDataGridObjects()
pDesignObj_Generator->m_bCanBeHidden=pDesignObj_Generator->m_bHideByDefault=true;
if( pDesignObj_Generator->m_pRow_DesignObjVariation ) // Be sure it's a valid object
{
m_mapChildDgObjects[ make_pair<int,int> (0,iRow) ] = pDesignObj_Generator; // m_mapChildDgObjects is col/row to object
m_mapChildDgObjects[ make_pair (0,iRow) ] = pDesignObj_Generator; // m_mapChildDgObjects is col/row to object
// Reduce this grid by the size of the up/down
m_alChildDesignObjs.push_back(pDesignObj_Generator);
}
......@@ -2640,7 +2640,7 @@ void DesignObj_Generator::AddDataGridObjects()
pDesignObj_Generator->m_bCanBeHidden=pDesignObj_Generator->m_bHideByDefault=true;
if( pDesignObj_Generator->m_pRow_DesignObjVariation ) // Be sure it's a valid object
{
m_mapChildDgObjects[ make_pair<int,int> (iCol,iRow) ] = pDesignObj_Generator; // m_mapChildDgObjects is col/row to object
m_mapChildDgObjects[ make_pair (iCol,iRow) ] = pDesignObj_Generator; // m_mapChildDgObjects is col/row to object
// Reduce this grid by the size of the up/down
m_alChildDesignObjs.push_back(pDesignObj_Generator);
}
......
......@@ -1221,7 +1221,7 @@ loop_to_keep_looking_for_objs_to_include:
continue; // Only matters for non-zero locations
if( m_htGeneratedScreens.find( StringUtils::itos( oco->m_pRow_DesignObj->PK_DesignObj_get() ) + "." + StringUtils::itos( li->iLocation ) )==m_htGeneratedScreens.end() )
alNewDesignObjLocationsToGenerate.push_back( make_pair<Row_DesignObj *,int> (oco->m_pRow_DesignObj, li->iLocation) );
alNewDesignObjLocationsToGenerate.push_back( make_pair (oco->m_pRow_DesignObj, li->iLocation) );
}
}
if( oco->m_bUsingCache )
......
......@@ -1708,7 +1708,7 @@ void Orbiter_Plugin::CMD_Orbiter_Registered(string sOnOff,int iPK_Users,string s
continue;
int iRemoteID = atoi(pDeviceData_Router->m_mapParameters_Find(DEVICEDATA_PortChannel_Number_CONST).c_str());
pOrbiterFileBrowser_Collection->m_mapRemoteControls[ sSerialNumber ] = make_pair<int,int> (pDeviceData_Router->m_dwPK_Device,iRemoteID);
pOrbiterFileBrowser_Collection->m_mapRemoteControls[ sSerialNumber ] = make_pair (pDeviceData_Router->m_dwPK_Device,iRemoteID);
}
}
......
......@@ -114,12 +114,7 @@ void DatabaseUtils::GetUnusedPortsOnAllPCs(DBHelper *pDBHelper,vector< pair<int,
GetUnusedPortsOnPC(pDBHelper,PK_Device,vectPorts);
for (size_t s = 0;s < vectPorts.size();++s)
{
#ifdef WIN32
// this is c++11
vectAllPorts.push_back(make_pair (PK_Device, vectPorts[s]));
#else
vectAllPorts.push_back(make_pair<int, string>(PK_Device, vectPorts[s]));
#endif // WIN32
}
}
}
......@@ -219,11 +214,7 @@ void DatabaseUtils::GetAllDevicesInTree(DBHelper *pDBHelper,int PK_Device,map<in
DB_ROW row;
if ((result.r = pDBHelper->db_wrapper_query_result(sSQL)) && (row = db_wrapper_fetch_row(result.r)) && row[0])
{
#ifdef WIN32
mapDeviceTree[PK_Device] = make_pair (atoi(row[0]), Generation);
#else
mapDeviceTree[PK_Device] = make_pair<int, int>(atoi(row[0]), Generation);
#endif
}
}
if( bCheckParent )
......
......@@ -2805,7 +2805,7 @@ bool Telecom_Plugin::VoiceMailChanged(class Socket *pSocket,class Message *pMess
}
PLUTO_SAFETY_LOCK_ERRORSONLY(vm, m_TelecomMutex);
m_mapVoiceMailStatus[userid] = std::make_pair<string, string> (value_param, text_param);
m_mapVoiceMailStatus[userid] = std::make_pair (value_param, text_param);
vm.Release();
for(map<int,OH_Orbiter *>::iterator it=m_pOrbiter_Plugin->m_mapOH_Orbiter.begin();it!=m_pOrbiter_Plugin->m_mapOH_Orbiter.end();++it)
......
......@@ -166,7 +166,7 @@ bool USB_Game_Pad::GetConfig()
while(pos<vectCodes[s].size())
{
string sCode = StringUtils::Tokenize(vectCodes[s]," ",pos);
m_mapCodesToButtons[sCode] = make_pair<string,int> (sButton,PK_DeviceRemote);
m_mapCodesToButtons[sCode] = make_pair (sButton,PK_DeviceRemote);
LoggerWrapper::GetInstance()->Write(LV_STATUS,"Code: %s will fire button %s",sCode.c_str(),sButton.c_str());
}
}
......@@ -178,20 +178,20 @@ bool USB_Game_Pad::GetConfig()
// Local mode, hard code values to lookup.
// Button 1 = OK
// Buttons 2-10 = Mode buttons to blindly set video modes.
m_mapCodesToButtons["USB-GAMEPAD-UP"] = make_pair<string,int>("up",0);
m_mapCodesToButtons["USB-GAMEPAD-DOWN"] = make_pair<string,int>("down",0);
m_mapCodesToButtons["USB-GAMEPAD-LEFT"] = make_pair<string,int>("left",0);
m_mapCodesToButtons["USB-GAMEPAD-RIGHT"] = make_pair<string,int>("right",0);
m_mapCodesToButtons["USB-GAMEPAD-B1"] = make_pair<string,int>("ok",0);
m_mapCodesToButtons["USB-GAMEPAD-B2"] = make_pair<string,int>("1",0);