replace unreachable returns by aborts
functionally identical but nicer, as discussed in PR
This commit is contained in:
parent
8445db1f63
commit
786c85a58b
@ -45,7 +45,7 @@ class RemoteDevice : public Device {
|
|||||||
ResourceMgr* resource_manager() override {
|
ResourceMgr* resource_manager() override {
|
||||||
LOG(FATAL) << "Accessing the resource manager of a remote device is not "
|
LOG(FATAL) << "Accessing the resource manager of a remote device is not "
|
||||||
<< "supported.";
|
<< "supported.";
|
||||||
return nullptr;
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsLocal() const override { return false; }
|
bool IsLocal() const override { return false; }
|
||||||
|
@ -70,7 +70,7 @@ const DeviceAttributes& DeviceBase::attributes() const {
|
|||||||
|
|
||||||
const string& DeviceBase::name() const {
|
const string& DeviceBase::name() const {
|
||||||
LOG(FATAL) << "Device does not implement name()";
|
LOG(FATAL) << "Device does not implement name()";
|
||||||
return "";
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceBase::set_eigen_cpu_device(Eigen::ThreadPoolDevice* d) {
|
void DeviceBase::set_eigen_cpu_device(Eigen::ThreadPoolDevice* d) {
|
||||||
|
@ -328,7 +328,7 @@ string GetTempFilename(const string& extension) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG(FATAL) << "No temp directory found.";
|
LOG(FATAL) << "No temp directory found.";
|
||||||
return "";
|
std::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user