From 3806e6d47e06e799cf657a055941cb3ce9934b33 Mon Sep 17 00:00:00 2001 From: Balhau Date: Sun, 2 Dec 2018 10:22:09 +0000 Subject: [PATCH] cout receives modifiers like hex, dec to change the way it outputs the data. This works as a state machine so after we change it this stays unless we reset the state. So in this case after we print hex data we change in the end of the method to reuse again the decimal default output format --- src/core/cpu/utils.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/cpu/utils.hpp b/src/core/cpu/utils.hpp index 83be565..e2c8bf7 100644 --- a/src/core/cpu/utils.hpp +++ b/src/core/cpu/utils.hpp @@ -32,6 +32,9 @@ namespace Core { static const UChar SHIFT_16 = 16; static const UChar SHIFT_8 = 8; + /** + * Template function (generics) to enable the printing of several datatypes + */ template static void printHex(Number *num,Int len) { for(int i=0;i