mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Removed unnecessary ::std::string calls.
All the Error and assert calls were using const ::std::string & arguments. When provided with a char*, the compiler was creating a temporary string object to pass in. This was triggering mallocs everywhere, even in the fast paths. Change-Id: Ie0ad1f240334de677618086bddd64113c56aae6e
This commit is contained in:
committed by
Peter Johnson
parent
055ee09825
commit
61760c839a
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <stdint.h>
|
||||
#include "llvm/StringRef.h"
|
||||
|
||||
// Forward declarations
|
||||
class ErrorBase;
|
||||
@@ -41,8 +42,8 @@ class Error {
|
||||
const ErrorBase* GetOriginatingObject() const;
|
||||
double GetTimestamp() const;
|
||||
void Clear();
|
||||
void Set(Code code, const std::string& contextMessage,
|
||||
const std::string& filename, const std::string& function,
|
||||
void Set(Code code, llvm::StringRef contextMessage,
|
||||
llvm::StringRef filename, llvm::StringRef function,
|
||||
uint32_t lineNumber, const ErrorBase* originatingObject);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user