mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-06-07 19:32:09 +03:00
* Upgraded Steamworks SDK to v1.29 * Fixed mod compatibility problem with Multiplayer Base that was introduced in September. * In Hammer, while using the Vertex Tool, pressing CTRL+B will snap selected vertices to the grid. Virtual Reality: * Mods that support virtual reality now need to have a line in gameinfo.txt that says “supportsvr 1”. This indicates to gameui and engine that certain UI should be enabled. * VR-enabled mods will now start up in VR mode when launched from Steam’s VR mode. Windows: * Upgraded to Visual Studio 2013. If you need to build projects for VS 2010, add /2010 to your VPC command line. OSX: * Upgraded to XCode 5.
53 lines
1.3 KiB
C++
53 lines
1.3 KiB
C++
//========= Copyright, Valve Corporation, All rights reserved. ================//
|
|
//
|
|
// std::pair style container; exists to work easily in our CUtlMap/CUtlHashMap classes
|
|
//
|
|
//=============================================================================//
|
|
|
|
#ifndef UTLPAIR_H
|
|
#define UTLPAIR_H
|
|
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
|
|
// std::pair style container; exists to work easily in our CUtlMap/CUtlHashMap classes
|
|
template<typename T1, typename T2>
|
|
class CUtlPair
|
|
{
|
|
public:
|
|
CUtlPair() {}
|
|
CUtlPair( T1 t1, T2 t2 ) : first( t1 ), second( t2 ) {}
|
|
|
|
bool operator<( const CUtlPair<T1,T2> &rhs ) const {
|
|
if ( first != rhs.first )
|
|
return first < rhs.first;
|
|
return second < rhs.second;
|
|
}
|
|
|
|
bool operator==( const CUtlPair<T1,T2> &rhs ) const {
|
|
return first == rhs.first && second == rhs.second;
|
|
}
|
|
|
|
T1 first;
|
|
T2 second;
|
|
};
|
|
|
|
// utility to make a CUtlPair without having to specify template parameters
|
|
template<typename T1, typename T2>
|
|
inline CUtlPair<T1,T2> MakeUtlPair( T1 t1, T2 t2 )
|
|
{
|
|
return CUtlPair<T1,T2>(t1, t2);
|
|
}
|
|
|
|
//// HashItem() overload that works automatically with our hash containers
|
|
//template<typename T1, typename T2>
|
|
//inline uint32 HashItem( const CUtlPair<T1,T2> &item )
|
|
//{
|
|
// return HashItem( (uint64)HashItem( item.first ) + ((uint64)HashItem( item.second ) << 32) );
|
|
//}
|
|
|
|
|
|
#endif // UTLPAIR_H
|