mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 16:11:02 +08:00
Fixed some warnings
This commit is contained in:
parent
434622e282
commit
a5730169cc
@ -16,6 +16,7 @@ include_directories(
|
|||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
|
||||||
endif(UNIX)
|
endif(UNIX)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
@ -14,7 +14,7 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||||
/**/
|
**/
|
||||||
|
|
||||||
#ifndef ____PROFILER____H_______
|
#ifndef ____PROFILER____H_______
|
||||||
#define ____PROFILER____H_______
|
#define ____PROFILER____H_______
|
||||||
@ -54,19 +54,13 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifdef _BUILD_PROFILER
|
#ifdef _BUILD_PROFILER
|
||||||
#define PROFILER_API __declspec(dllexport)
|
#define PROFILER_API __declspec(dllexport)
|
||||||
#define EXPIMP_TEMPLATE
|
|
||||||
#else
|
#else
|
||||||
#define PROFILER_API __declspec(dllimport)
|
#define PROFILER_API __declspec(dllimport)
|
||||||
#define EXPIMP_TEMPLATE extern
|
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define PROFILER_API
|
#define PROFILER_API
|
||||||
#define EXPIMP_TEMPLATE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace profiler
|
namespace profiler
|
||||||
{
|
{
|
||||||
class Mark;
|
class Mark;
|
||||||
|
@ -14,11 +14,11 @@ const unsigned char MARK_TYPE_BEGIN = 3;
|
|||||||
const unsigned char MARK_TYPE_END = 4;
|
const unsigned char MARK_TYPE_END = 4;
|
||||||
|
|
||||||
Mark::Mark(const char* _name, color_t _color) :
|
Mark::Mark(const char* _name, color_t _color) :
|
||||||
begin(0),
|
type(0),
|
||||||
color(_color),
|
color(_color),
|
||||||
thread_id(0),
|
begin(0),
|
||||||
name(_name),
|
thread_id(0),
|
||||||
type(0)
|
name(_name)
|
||||||
{
|
{
|
||||||
tick(begin);
|
tick(begin);
|
||||||
thread_id = std::hash<std::thread::id>()(std::this_thread::get_id());
|
thread_id = std::hash<std::thread::id>()(std::this_thread::get_id());
|
||||||
@ -32,8 +32,8 @@ void Mark::tick(timestamp_t& stamp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Block::Block(const char* _name, color_t _color) :
|
Block::Block(const char* _name, color_t _color) :
|
||||||
Mark(_name, _color),
|
Mark(_name, _color),
|
||||||
end(begin)
|
end(begin)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||||
/**/
|
**/
|
||||||
|
|
||||||
#ifndef ___PROFILER____MANAGER____H______
|
#ifndef ___PROFILER____MANAGER____H______
|
||||||
#define ___PROFILER____MANAGER____H______
|
#define ___PROFILER____MANAGER____H______
|
||||||
|
Loading…
x
Reference in New Issue
Block a user